Use the worker created in the child actor (bug 1966721)#19935
Use the worker created in the child actor (bug 1966721)#19935calixteman merged 1 commit intomozilla:masterfrom
Conversation
Snuffleupagus
left a comment
There was a problem hiding this comment.
Using a global pdfjsWorker property seems problematic here, since we're using the existence of globalThis.pdfjsWorker as an indication that fake-workers are being used.
Correct. What do you think about |
Naming things is hard, but maybe Another thing that just occurred to me is that we already have the diff --git a/web/app_options.js b/web/app_options.js
index 461336dc1..34615b8fc 100644
--- a/web/app_options.js
+++ b/web/app_options.js
@@ -502,7 +502,10 @@ const defaultOptions = {
workerPort: {
/** @type {Object} */
- value: null,
+ value:
+ typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")
+ ? globalThis.pdfjsPreloadedWorker
+ : null,
kind: OptionKind.WORKER,
},
workerSrc: { |
Snuffleupagus
left a comment
There was a problem hiding this comment.
Nit: In the commit message (and PR title) there seems to be a missing word.
Use the worker created when the child actor has been {word missing here} (bug 1966721)
r=me, thank you.
No description provided.