From f25134a4153040cb139d7142dac1d0150fd7cfcd Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 15 Apr 2023 17:01:03 +0200 Subject: [PATCH] Remove the IMAGE_DECODERS special-case when polyfilling `structuredClone` Originally we only used the `structuredClone` polyfill in the `LoopbackPort`-implementation, and that obviously isn't used anywhere within the various image decoders. At this point in time we've started to use `structuredClone` a little bit more, hence it seems overall simpler to just bundle the polyfill even in the `legacy`-version of the IMAGE_DECODERS built-target. --- src/shared/compatibility.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/shared/compatibility.js b/src/shared/compatibility.js index 35a42ab4bac1c0..cf623e0c55f5c5 100644 --- a/src/shared/compatibility.js +++ b/src/shared/compatibility.js @@ -54,11 +54,6 @@ import { isNodeJS } from "./is_node.js"; // Support: Chrome<98, Safari<15.4 (function checkStructuredClone() { - if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("IMAGE_DECODERS")) { - // The current image decoders are synchronous, hence `structuredClone` - // shouldn't need to be polyfilled for the IMAGE_DECODERS build target. - return; - } if (globalThis.structuredClone) { return; }