Upstream changes from Bug 1202902 - Give loader scripts and XUL frame scripts a lexical scope that doesn't break everything?
One of the patches in https://bugzilla.mozilla.org/show_bug.cgi?id=1202902, specifically [`Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff)`](https://hg.mozilla.org/mozilla-central/rev/380817d573cd), touches PDF.js code. Unfortunately it was landed upstream without, as far as I can tell, notifying us about it. This patch uplifts the relevant changes to avoid future merge conflicts, and for consistency also tweaks `PdfJs-stub.jsm`.
This commit is contained in:
parent
1bdfc47de8
commit
26ec36ba4c
@ -22,6 +22,6 @@
|
|||||||
// See https://mxr.mozilla.org/mozilla-central/source/browser/components/nsBrowserGlue.js
|
// See https://mxr.mozilla.org/mozilla-central/source/browser/components/nsBrowserGlue.js
|
||||||
var EXPORTED_SYMBOLS = ['PdfJs'];
|
var EXPORTED_SYMBOLS = ['PdfJs'];
|
||||||
|
|
||||||
let PdfJs = {
|
var PdfJs = {
|
||||||
init: function PdfJs_init() {}
|
init: function PdfJs_init() {}
|
||||||
};
|
};
|
||||||
|
@ -43,7 +43,7 @@ const PDF_CONTENT_TYPE = 'application/pdf';
|
|||||||
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
|
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
|
||||||
Cu.import('resource://gre/modules/Services.jsm');
|
Cu.import('resource://gre/modules/Services.jsm');
|
||||||
|
|
||||||
let Svc = {};
|
var Svc = {};
|
||||||
XPCOMUtils.defineLazyServiceGetter(Svc, 'mime',
|
XPCOMUtils.defineLazyServiceGetter(Svc, 'mime',
|
||||||
'@mozilla.org/mime;1',
|
'@mozilla.org/mime;1',
|
||||||
'nsIMIMEService');
|
'nsIMIMEService');
|
||||||
@ -130,7 +130,7 @@ Factory.prototype = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let PdfJs = {
|
var PdfJs = {
|
||||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
|
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
|
||||||
_registered: false,
|
_registered: false,
|
||||||
_initialized: false,
|
_initialized: false,
|
||||||
|
@ -32,7 +32,7 @@ const PDF_CONTENT_TYPE = 'application/pdf';
|
|||||||
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
|
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
|
||||||
Cu.import('resource://gre/modules/Services.jsm');
|
Cu.import('resource://gre/modules/Services.jsm');
|
||||||
|
|
||||||
let Svc = {};
|
var Svc = {};
|
||||||
XPCOMUtils.defineLazyServiceGetter(Svc, 'mime',
|
XPCOMUtils.defineLazyServiceGetter(Svc, 'mime',
|
||||||
'@mozilla.org/mime;1',
|
'@mozilla.org/mime;1',
|
||||||
'nsIMIMEService');
|
'nsIMIMEService');
|
||||||
|
@ -29,7 +29,7 @@ const Cu = Components.utils;
|
|||||||
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
|
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
|
||||||
Cu.import('resource://gre/modules/Services.jsm');
|
Cu.import('resource://gre/modules/Services.jsm');
|
||||||
|
|
||||||
let PdfjsContentUtils = {
|
var PdfjsContentUtils = {
|
||||||
_mm: null,
|
_mm: null,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user