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:
Jonas Jenwald 2015-10-01 09:56:15 +02:00
parent 1bdfc47de8
commit 26ec36ba4c
4 changed files with 5 additions and 5 deletions

View File

@ -22,6 +22,6 @@
// See https://mxr.mozilla.org/mozilla-central/source/browser/components/nsBrowserGlue.js
var EXPORTED_SYMBOLS = ['PdfJs'];
let PdfJs = {
var PdfJs = {
init: function PdfJs_init() {}
};

View File

@ -43,7 +43,7 @@ const PDF_CONTENT_TYPE = 'application/pdf';
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
Cu.import('resource://gre/modules/Services.jsm');
let Svc = {};
var Svc = {};
XPCOMUtils.defineLazyServiceGetter(Svc, 'mime',
'@mozilla.org/mime;1',
'nsIMIMEService');
@ -130,7 +130,7 @@ Factory.prototype = {
}
};
let PdfJs = {
var PdfJs = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
_registered: false,
_initialized: false,

View File

@ -32,7 +32,7 @@ const PDF_CONTENT_TYPE = 'application/pdf';
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
Cu.import('resource://gre/modules/Services.jsm');
let Svc = {};
var Svc = {};
XPCOMUtils.defineLazyServiceGetter(Svc, 'mime',
'@mozilla.org/mime;1',
'nsIMIMEService');

View File

@ -29,7 +29,7 @@ const Cu = Components.utils;
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
Cu.import('resource://gre/modules/Services.jsm');
let PdfjsContentUtils = {
var PdfjsContentUtils = {
_mm: null,
/*