Bug 1366023 - Explicitly import Services.jsm in a few content scripts. r=Gijs
authorAndrew McCreight <continuation@gmail.com>
Fri, 12 May 2017 15:57:53 -0700
changeset 359198 d3ccffa738f78f18b504206ffae318a17f398579
parent 359197 e486cf1ce1b0dcc580f020abab6351789cf88669
child 359199 ae70452909e2c876d4db4cf76c454c5ca97e8bf8
push id43017
push useramccreight@mozilla.com
push dateFri, 19 May 2017 14:39:46 +0000
treeherderautoland@d3ccffa738f7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1366023
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1366023 - Explicitly import Services.jsm in a few content scripts. r=Gijs MozReview-Commit-ID: 5HS9tXk3oa9
testing/mochitest/tests/SimpleTest/AsyncUtilsContent.js
testing/specialpowers/content/specialpowers.js
toolkit/modules/addons/WebNavigationContent.js
--- a/testing/mochitest/tests/SimpleTest/AsyncUtilsContent.js
+++ b/testing/mochitest/tests/SimpleTest/AsyncUtilsContent.js
@@ -1,13 +1,15 @@
 /*
  * This code is used for handling synthesizeMouse in a content process.
  * Generally it just delegates to EventUtils.js.
  */
 
+Components.utils.import("resource://gre/modules/Services.jsm");
+
 // Set up a dummy environment so that EventUtils works. We need to be careful to
 // pass a window object into each EventUtils method we call rather than having
 // it rely on the |window| global.
 var EventUtils = {};
 EventUtils.window = {};
 EventUtils.parent = EventUtils.window;
 EventUtils._EU_Ci = Components.interfaces;
 EventUtils._EU_Cc = Components.classes;
--- a/testing/specialpowers/content/specialpowers.js
+++ b/testing/specialpowers/content/specialpowers.js
@@ -1,15 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 /* This code is loaded in every child process that is started by mochitest in
  * order to be used as a replacement for UniversalXPConnect
  */
 
+Components.utils.import("resource://gre/modules/Services.jsm");
+
 function SpecialPowers(window) {
   this.window = Components.utils.getWeakReference(window);
   this._windowID = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
                          .getInterface(Components.interfaces.nsIDOMWindowUtils)
                          .currentInnerWindowID;
   this._encounteredCrashDumpFiles = [];
   this._unexpectedCrashDumpFiles = { };
   this._crashDumpDir = null;
--- a/toolkit/modules/addons/WebNavigationContent.js
+++ b/toolkit/modules/addons/WebNavigationContent.js
@@ -1,15 +1,16 @@
 "use strict";
 
 /* globals docShell */
 
 var Ci = Components.interfaces;
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+Components.utils.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "WebNavigationFrames",
                                   "resource://gre/modules/WebNavigationFrames.jsm");
 
 function loadListener(event) {
   let document = event.target;
   let window = document.defaultView;
   let url = document.documentURI;