Upstream the changes from: Bug 1432992 - Remove definitions of Ci, Cr, Cc, and Cu

Please see:
 - https://bugzilla.mozilla.org/show_bug.cgi?id=1432992
 - https://hg.mozilla.org/integration/autoland/rev/b38d59f71915
This commit is contained in:
Jonas Jenwald 2018-02-07 10:34:50 +01:00
parent 25293628ff
commit 59028bac42
10 changed files with 6 additions and 36 deletions

View File

@ -20,11 +20,7 @@
const RESOURCE_NAME = "pdf.js";
const EXT_PREFIX = "extensions.uriloader@pdf.js";
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cm = Components.manager;
const Cu = Components.utils;
const Cr = Components.results;
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
ChromeUtils.import("resource://gre/modules/Services.jsm");

View File

@ -19,11 +19,7 @@
(function contentScriptClosure() {
// we need to use closure here -- we are running in the global context
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cm = Components.manager;
const Cu = Components.utils;
const Cr = Components.results;
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
ChromeUtils.import("resource://gre/modules/Services.jsm");

View File

@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint max-len: ["error", 100] */
"use strict";

View File

@ -17,11 +17,7 @@
var EXPORTED_SYMBOLS = ["PdfJs"];
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
const Cm = Components.manager;
const Cu = Components.utils;
const PREF_PREFIX = "pdfjs";
const PREF_DISABLED = PREF_PREFIX + ".disabled";
@ -50,9 +46,9 @@ XPCOMUtils.defineLazyServiceGetter(Svc, "pluginHost",
"@mozilla.org/plugin/host;1",
"nsIPluginHost");
ChromeUtils.defineModuleGetter(this, "PdfjsChromeUtils",
"resource://pdf.js/PdfjsChromeUtils.jsm");
"resource://pdf.js/PdfjsChromeUtils.jsm");
ChromeUtils.defineModuleGetter(this, "PdfjsContentUtils",
"resource://pdf.js/PdfjsContentUtils.jsm");
"resource://pdf.js/PdfjsContentUtils.jsm");
function getBoolPref(aPref, aDefaultValue) {
try {

View File

@ -18,7 +18,6 @@
this.EXPORTED_SYMBOLS = ["PdfJsTelemetry"];
const Cu = Components.utils;
ChromeUtils.import("resource://gre/modules/Services.jsm");
this.PdfJsTelemetry = {

View File

@ -17,11 +17,6 @@
var EXPORTED_SYMBOLS = ["PdfStreamConverter"];
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
const PDFJS_EVENT_ID = "pdf.js.message";
const PREF_PREFIX = "PDFJSSCRIPT_PREF_PREFIX";
const PDF_VIEWER_WEB_PAGE = "resource://pdf.js/web/viewer.html";
@ -111,7 +106,7 @@ function getDOMWindow(aChannel) {
var requestor = aChannel.notificationCallbacks ?
aChannel.notificationCallbacks :
aChannel.loadGroup.notificationCallbacks;
var win = requestor.getInterface(Components.interfaces.nsIDOMWindow);
var win = requestor.getInterface(Ci.nsIDOMWindow);
return win;
}

View File

@ -17,11 +17,6 @@
var EXPORTED_SYMBOLS = ["PdfjsChromeUtils"];
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
const PREF_PREFIX = "PDFJSSCRIPT_PREF_PREFIX";
const PDF_CONTENT_TYPE = "application/pdf";

View File

@ -17,12 +17,6 @@
var EXPORTED_SYMBOLS = ["PdfjsContentUtils"];
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
ChromeUtils.import("resource://gre/modules/Services.jsm");
var PdfjsContentUtils = {

View File

@ -112,7 +112,7 @@
// use the short language code for "full" codes like 'ar-sa' (issue 5440)
var shortCode = gLanguage.split("-")[0];
return (rtlList.indexOf(shortCode) >= 0) ? "rtl" : "ltr";
return (rtlList.includes(shortCode) ? "rtl" : "ltr");
},
getReadyState() {

View File

@ -9,8 +9,8 @@
"babel-preset-env": "^1.6.1",
"core-js": "^2.5.3",
"escodegen": "^1.9.0",
"eslint": "^4.16.0",
"eslint-plugin-mozilla": "^0.7.0",
"eslint": "^4.17.0",
"eslint-plugin-mozilla": "^0.8.1",
"eslint-plugin-no-unsanitized": "^2.0.2",
"fancy-log": "^1.3.2",
"gulp": "^3.9.1",