Bug 1252346 - Some DevTools files missing Services. r=ochameau draft
authorJ. Ryan Stinnett <jryans@gmail.com>
Mon, 29 Feb 2016 21:23:05 -0600
changeset 335849 11aed1ec95edb26dbdb0e283a41c6bceb58ff7e1
parent 335831 d6788a70c97b5ed250e65e4d83c435fc6791e3ff
child 515231 4f10f45ab1bcd18c0bb7bc47aa8dd3e73704502f
push id11893
push userbmo:jryans@gmail.com
push dateTue, 01 Mar 2016 18:23:02 +0000
reviewersochameau
bugs1252346
milestone47.0a1
Bug 1252346 - Some DevTools files missing Services. r=ochameau MozReview-Commit-ID: F1SjhiXNZSj
devtools/client/framework/target.js
devtools/client/netmonitor/har/toolbox-overlay.js
devtools/client/webide/modules/simulators.js
devtools/shared/touch/simulator.js
--- a/devtools/client/framework/target.js
+++ b/devtools/client/framework/target.js
@@ -4,16 +4,17 @@
  * 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/. */
 
 "use strict";
 
 const { Ci, Cu } = require("chrome");
 const promise = require("promise");
 const EventEmitter = require("devtools/shared/event-emitter");
+const Services = require("Services");
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 loader.lazyRequireGetter(this, "DebuggerServer", "devtools/server/main", true);
 loader.lazyRequireGetter(this, "DebuggerClient",
   "devtools/shared/client/main", true);
 
 const targets = new WeakMap();
 const promiseTargets = new WeakMap();
--- a/devtools/client/netmonitor/har/toolbox-overlay.js
+++ b/devtools/client/netmonitor/har/toolbox-overlay.js
@@ -1,14 +1,15 @@
 /* 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/. */
 "use strict";
 
 const { Cu, Ci } = require("chrome");
+const Services = require("Services");
 
 loader.lazyRequireGetter(this, "HarAutomation", "devtools/client/netmonitor/har/har-automation", true);
 
 // Map of all created overlays. There is always one instance of
 // an overlay per Toolbox instance (i.e. one per browser tab).
 const overlays = new WeakMap();
 
 /**
--- a/devtools/client/webide/modules/simulators.js
+++ b/devtools/client/webide/modules/simulators.js
@@ -7,16 +7,17 @@ const { AddonManager } = Cu.import("reso
 const { Task } = Cu.import("resource://gre/modules/Task.jsm", {});
 loader.lazyRequireGetter(this, "ConnectionManager", "devtools/shared/client/connection-manager", true);
 loader.lazyRequireGetter(this, "AddonSimulatorProcess", "devtools/client/webide/modules/simulator-process", true);
 loader.lazyRequireGetter(this, "OldAddonSimulatorProcess", "devtools/client/webide/modules/simulator-process", true);
 loader.lazyRequireGetter(this, "CustomSimulatorProcess", "devtools/client/webide/modules/simulator-process", true);
 const asyncStorage = require("devtools/shared/async-storage");
 const EventEmitter = require("devtools/shared/event-emitter");
 const promise = require("promise");
+const Services = require("Services");
 
 const SimulatorRegExp = new RegExp(Services.prefs.getCharPref("devtools.webide.simulatorAddonRegExp"));
 const LocaleCompare = (a, b) => {
   return a.name.toLowerCase().localeCompare(b.name.toLowerCase());
 };
 
 var Simulators = {
 
--- a/devtools/shared/touch/simulator.js
+++ b/devtools/shared/touch/simulator.js
@@ -1,15 +1,16 @@
 /* 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/. */
 "use strict";
 
 var { Ci } = require("chrome");
 var promise = require("promise");
+var Services = require("Services");
 
 const FRAME_SCRIPT =
   "resource://devtools/shared/touch/simulator-content.js";
 
 var trackedBrowsers = new WeakMap();
 var savedTouchEventsEnabled =
   Services.prefs.getIntPref("dom.w3c_touch_events.enabled");