Skip to content

Commit 1845515

Browse files
Snuffleupagusbackstroke-bot
authored andcommitted
Remove LoopbackPort.postMessage special-case for polyfilled TypedArrays
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.
1 parent f686fc7 commit 1845515

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/display/api.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -1492,10 +1492,7 @@ class LoopbackPort {
14921492
if ((buffer = value.buffer) && isArrayBuffer(buffer)) {
14931493
// We found object with ArrayBuffer (typed array).
14941494
const transferable = transfers && transfers.includes(buffer);
1495-
if (value === buffer) {
1496-
// Special case when we are faking typed arrays in compatibility.js.
1497-
result = value;
1498-
} else if (transferable) {
1495+
if (transferable) {
14991496
result = new value.constructor(
15001497
buffer,
15011498
value.byteOffset,

0 commit comments

Comments
 (0)