Merge pull request #16217 from calixteman/bug1824610
ESMify some modules for m-c (bug 1824610)
This commit is contained in:
commit
b292d1ab95
@ -13,10 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["PdfJsDefaultPreferences"];
|
||||
|
||||
var PdfJsDefaultPreferences = Object.freeze(
|
||||
export const PdfJsDefaultPreferences = Object.freeze(
|
||||
PDFJSDev.eval("DEFAULT_PREFERENCES")
|
||||
);
|
17
gulpfile.js
17
gulpfile.js
@ -434,12 +434,15 @@ function createSandboxExternal(defines) {
|
||||
saveComments: false,
|
||||
defines,
|
||||
};
|
||||
return gulp.src("./src/pdf.sandbox.external.js").pipe(
|
||||
transform("utf8", content => {
|
||||
content = preprocessor2.preprocessPDFJSCode(ctx, content);
|
||||
return `${licenseHeader}\n${content}`;
|
||||
})
|
||||
);
|
||||
return gulp
|
||||
.src("./src/pdf.sandbox.external.js")
|
||||
.pipe(rename("pdf.sandbox.external.sys.mjs"))
|
||||
.pipe(
|
||||
transform("utf8", content => {
|
||||
content = preprocessor2.preprocessPDFJSCode(ctx, content);
|
||||
return `${licenseHeader}\n${content}`;
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
function createTemporaryScriptingBundle(defines, extraOptions = undefined) {
|
||||
@ -1381,7 +1384,7 @@ gulp.task(
|
||||
.pipe(gulp.dest(MOZCENTRAL_L10N_DIR)),
|
||||
gulp.src("LICENSE").pipe(gulp.dest(MOZCENTRAL_EXTENSION_DIR)),
|
||||
gulp
|
||||
.src(FIREFOX_CONTENT_DIR + "PdfJsDefaultPreferences.jsm")
|
||||
.src(FIREFOX_CONTENT_DIR + "PdfJsDefaultPreferences.sys.mjs")
|
||||
.pipe(transform("utf8", preprocessDefaultPreferences))
|
||||
.pipe(gulp.dest(MOZCENTRAL_CONTENT_DIR)),
|
||||
]);
|
||||
|
@ -16,7 +16,7 @@
|
||||
// In mozilla-central, this file is loaded as non-module script,
|
||||
// so it mustn't have any dependencies.
|
||||
|
||||
class SandboxSupportBase {
|
||||
export class SandboxSupportBase {
|
||||
/**
|
||||
* @param {DOMWindow} - win
|
||||
*/
|
||||
@ -181,10 +181,3 @@ class SandboxSupportBase {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
|
||||
exports.SandboxSupportBase = SandboxSupportBase;
|
||||
} else {
|
||||
/* eslint-disable-next-line no-unused-vars, no-var */
|
||||
var EXPORTED_SYMBOLS = ["SandboxSupportBase"];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user