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.
This commit is contained in:
Jonas Jenwald 2023-04-15 17:01:03 +02:00
parent 1753e321cd
commit f79f48c2b4

View File

@ -54,11 +54,6 @@ import { isNodeJS } from "./is_node.js";
// Support: Chrome<98, Safari<15.4 // Support: Chrome<98, Safari<15.4
(function checkStructuredClone() { (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) { if (globalThis.structuredClone) {
return; return;
} }