Re-factor how the sandboxBundleSrc option is passed to PDFScriptingManager

Given that this option isn't used in the Firefox PDF Viewer, we can (ever so slightly) reduce the amount of code needed.
This commit is contained in:
Jonas Jenwald 2023-12-09 09:40:07 +01:00
parent 988d3a188f
commit 92c15a61f1
6 changed files with 12 additions and 28 deletions

View file

@ -110,7 +110,7 @@ class DefaultExternalServices {
throw new Error("Not implemented: createL10n");
}
static createScripting(options) {
static createScripting() {
throw new Error("Not implemented: createScripting");
}
@ -395,10 +395,6 @@ const PDFViewerApplication = {
const pdfScriptingManager = new PDFScriptingManager({
eventBus,
sandboxBundleSrc:
typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC || CHROME")
? AppOptions.get("sandboxBundleSrc")
: null,
externalServices,
docProperties: this._scriptingDocProperties.bind(this),
});