Skip to content

Commit

Permalink
Merge pull request #9511 from Snuffleupagus/more-upstreaming
Browse files Browse the repository at this point in the history
Upstream changes from bug 792808 and 1440284
  • Loading branch information
brendandahl authored Feb 26, 2018
2 parents 5f98f9b + 5497bdc commit 97faedb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions extensions/firefox/content/PdfJsTelemetry-stub.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

"use strict";

this.EXPORTED_SYMBOLS = ["PdfJsTelemetry"];
var EXPORTED_SYMBOLS = ["PdfJsTelemetry"];

this.PdfJsTelemetry = {
var PdfJsTelemetry = {
onViewerIsUsed() {
},
onFallback() {
Expand Down
4 changes: 2 additions & 2 deletions extensions/firefox/content/PdfJsTelemetry.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

"use strict";

this.EXPORTED_SYMBOLS = ["PdfJsTelemetry"];
var EXPORTED_SYMBOLS = ["PdfJsTelemetry"];

ChromeUtils.import("resource://gre/modules/Services.jsm");

this.PdfJsTelemetry = {
var PdfJsTelemetry = {
onViewerIsUsed() {
let histogram = Services.telemetry.getHistogramById("PDF_VIEWER_USED");
histogram.add(true);
Expand Down
4 changes: 2 additions & 2 deletions extensions/firefox/content/PdfStreamConverter.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ ChromeUtils.defineModuleGetter(this, "PdfJsTelemetry",
ChromeUtils.defineModuleGetter(this, "PdfjsContentUtils",
"resource://pdf.js/PdfjsContentUtils.jsm");

Cu.importGlobalProperties(["XMLHttpRequest"]);

var Svc = {};
XPCOMUtils.defineLazyServiceGetter(Svc, "mime",
"@mozilla.org/mime;1",
Expand Down Expand Up @@ -593,8 +595,6 @@ class RangedChromeActions extends ChromeActions {
}
};
var getXhr = function getXhr() {
const XMLHttpRequest = Components.Constructor(
"@mozilla.org/xmlextras/xmlhttprequest;1");
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", xhr_onreadystatechange);
return xhr;
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"babel-preset-env": "^1.6.1",
"core-js": "^2.5.3",
"escodegen": "^1.9.0",
"eslint": "^4.17.0",
"eslint-plugin-mozilla": "^0.8.1",
"eslint-plugin-no-unsanitized": "^2.0.2",
"eslint": "^4.18.1",
"eslint-plugin-mozilla": "^0.9.0",
"eslint-plugin-no-unsanitized": "^3.0.0",
"fancy-log": "^1.3.2",
"gulp": "^3.9.1",
"gulp-rename": "^1.2.2",
Expand Down

0 comments on commit 97faedb

Please sign in to comment.