Skip to content

Commit

Permalink
Remove LoopbackPort.postMessage special-case for polyfilled `TypedA…
Browse files Browse the repository at this point in the history
…rray`s

Given that all `TypedArray` polyfills were removed in PDF.js version `2.0`, since native support is now required, this branch has been dead code for awhile.
  • Loading branch information
Snuffleupagus authored and backstroke-bot committed Jun 21, 2022
1 parent f686fc7 commit 1845515
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/display/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -1492,10 +1492,7 @@ class LoopbackPort {
if ((buffer = value.buffer) && isArrayBuffer(buffer)) {
// We found object with ArrayBuffer (typed array).
const transferable = transfers && transfers.includes(buffer);
if (value === buffer) {
// Special case when we are faking typed arrays in compatibility.js.
result = value;
} else if (transferable) {
if (transferable) {
result = new value.constructor(
buffer,
value.byteOffset,
Expand Down

0 comments on commit 1845515

Please sign in to comment.