Merge pull request #6934 from jswalden/detach-terminology
Adjust a comment discussing transferred ArrayBuffers, to refer to those buffers being detached, not neutered
This commit is contained in:
commit
365bc99508
@ -573,10 +573,10 @@ var PDFImage = (function PDFImageClosure() {
|
|||||||
|
|
||||||
imgArray = this.getImageBytes(originalHeight * rowBytes);
|
imgArray = this.getImageBytes(originalHeight * rowBytes);
|
||||||
// If imgArray came from a DecodeStream, we're safe to transfer it
|
// If imgArray came from a DecodeStream, we're safe to transfer it
|
||||||
// (and thus neuter it) because it will constitute the entire
|
// (and thus detach its underlying buffer) because it will constitute
|
||||||
// DecodeStream's data. But if it came from a Stream, we need to
|
// the entire DecodeStream's data. But if it came from a Stream, we
|
||||||
// copy it because it'll only be a portion of the Stream's data, and
|
// need to copy it because it'll only be a portion of the Stream's
|
||||||
// the rest will be read later on.
|
// data, and the rest will be read later on.
|
||||||
if (this.image instanceof DecodeStream) {
|
if (this.image instanceof DecodeStream) {
|
||||||
imgData.data = imgArray;
|
imgData.data = imgArray;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user