mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Merge pull request #12773 from Snuffleupagus/move-sandboxBundleSrc
Pass in the "sandboxBundleSrc" option when calling `DefaultExternalServices.createScripting`
This commit is contained in:
commit
df53e7811c
5 changed files with 14 additions and 10 deletions
|
@ -167,7 +167,7 @@ class DefaultExternalServices {
|
|||
throw new Error("Not implemented: createL10n");
|
||||
}
|
||||
|
||||
static createScripting() {
|
||||
static createScripting(options) {
|
||||
throw new Error("Not implemented: createScripting");
|
||||
}
|
||||
|
||||
|
@ -1477,7 +1477,12 @@ const PDFViewerApplication = {
|
|||
if (pdfDocument !== this.pdfDocument) {
|
||||
return; // The document was closed while the data resolved.
|
||||
}
|
||||
const scripting = this.externalServices.createScripting();
|
||||
const scripting = this.externalServices.createScripting(
|
||||
typeof PDFJSDev === "undefined" ||
|
||||
PDFJSDev.test("!PRODUCTION || GENERIC || CHROME")
|
||||
? { sandboxBundleSrc: AppOptions.get("sandboxBundleSrc") }
|
||||
: null
|
||||
);
|
||||
// Store a reference to the current scripting-instance, to allow destruction
|
||||
// of the sandbox and removal of the event listeners at document closing.
|
||||
const internalEvents = new Map(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue