From f2f0a1e871dc80c8b7bc209345385de639e8edd4 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 13 Oct 2022 11:37:44 +0200 Subject: [PATCH] [api-minor] Stop sending "UnsupportedFeature" from the worker-thread GetOperatorList-handling This code was added all the way back in PR 6698, almost seven years ago, for backwards compatibility reasons. At this point in time, it seems that we can remove that since: - We have more fine-grained "UnsupportedFeature" reporting elsewhere in the worker-thread code nowadays. - The GetOperatorList-handling is now using `ReadableStream`s, which means that errors are being forwarded to the main-thread anyway. - We're also no longer displaying a notification-bar, in the *built-in* Firefox PDF Viewer, for any of these "UnsupportedFeature" messages. --- src/core/worker.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/core/worker.js b/src/core/worker.js index 8673f92d4..778bcdb1e 100644 --- a/src/core/worker.js +++ b/src/core/worker.js @@ -27,7 +27,6 @@ import { stringToPDFString, UnexpectedResponseException, UnknownErrorException, - UNSUPPORTED_FEATURES, VerbosityLevel, warn, } from "../shared/util.js"; @@ -728,12 +727,6 @@ class WorkerMessageHandler { if (task.terminated) { return; // ignoring errors from the terminated thread } - // For compatibility with older behavior, generating unknown - // unsupported feature notification on errors. - handler.send("UnsupportedFeature", { - featureId: UNSUPPORTED_FEATURES.errorOperatorList, - }); - sink.error(reason); // TODO: Should `reason` be re-thrown here (currently that casues