mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #12365 from Snuffleupagus/forbid-DecodeStream.length
Ensure that the `length` property won't be *accidentally* accessed on a `DecodeStream`-instance
This commit is contained in:
commit
dfebe7b907
1 changed files with 5 additions and 0 deletions
|
@ -167,6 +167,11 @@ var DecodeStream = (function DecodeStreamClosure() {
|
|||
}
|
||||
|
||||
DecodeStream.prototype = {
|
||||
// eslint-disable-next-line getter-return
|
||||
get length() {
|
||||
unreachable("Should not access DecodeStream.length");
|
||||
},
|
||||
|
||||
get isEmpty() {
|
||||
while (!this.eof && this.bufferLength === 0) {
|
||||
this.readBlock();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue