Bug 1252346 - Fixes missing Services definition or tweaked eslint to figure out where does it comes from. r=jryans
authorAlexandre Poirot <poirot.alex@gmail.com>
Tue, 01 Mar 2016 13:58:54 -0600
changeset 322652 a88b9e9d747ac5f4f9c06db041057cd7b606b992
parent 322651 50130647c697f1f70ab44a9438652128e85a8801
child 322653 5620bb00b64aa5a53eeeb0447979f51d2ebe09a5
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjryans
bugs1252346
milestone47.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 1252346 - Fixes missing Services definition or tweaked eslint to figure out where does it comes from. r=jryans
devtools/client/commandline/test/helpers.js
devtools/client/debugger/content/actions/sources.js
devtools/client/debugger/content/views/sources-view.js
devtools/client/debugger/utils.js
devtools/client/framework/test/shared-redux-head.js
devtools/client/inspector/fonts/fonts.js
devtools/client/inspector/markup/markup.js
devtools/client/inspector/rules/views/rule-editor.js
devtools/client/jsonview/test/doc_frame_script.js
devtools/client/jsonview/utils.js
devtools/client/responsivedesign/responsivedesign-child.js
devtools/client/webaudioeditor/views/context.js
devtools/client/webaudioeditor/views/inspector.js
devtools/shared/gcli/commands/highlight.js
devtools/shared/webconsole/network-helper.js
--- a/devtools/client/commandline/test/helpers.js
+++ b/devtools/client/commandline/test/helpers.js
@@ -19,16 +19,17 @@
 // A copy of this code exists in firefox mochitests. They should be kept
 // in sync. Hence the exports synonym for non AMD contexts.
 var { helpers, assert } = (function() {
 
 var helpers = {};
 
 var { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
 var { TargetFactory } = require("devtools/client/framework/target");
+var Services = require("Services");
 
 var assert = { ok: ok, is: is, log: info };
 var util = require('gcli/util/util');
 var cli = require('gcli/cli');
 var KeyEvent = require('gcli/util/util').KeyEvent;
 
 const { GcliFront } = require("devtools/server/actors/gcli");
 
--- a/devtools/client/debugger/content/actions/sources.js
+++ b/devtools/client/debugger/content/actions/sources.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";
 
 const constants = require('../constants');
 const promise = require('promise');
+const Services = require('Services');
 const { dumpn } = require("devtools/shared/DevToolsUtils");
 const { PROMISE, HISTOGRAM_ID } = require('devtools/client/shared/redux/middleware/promise');
 const { getSource, getSourceText } = require('../queries');
 
 const NEW_SOURCE_IGNORED_URLS = ["debugger eval code", "XStringBundle"];
 const FETCH_SOURCE_RESPONSE_DELAY = 200; // ms
 
 function getSourceClient(source) {
--- a/devtools/client/debugger/content/views/sources-view.js
+++ b/devtools/client/debugger/content/views/sources-view.js
@@ -1,11 +1,12 @@
 /* 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/. */
+/* import-globals-from ../../debugger-controller.js */
 "use strict";
 
 const utils = require('../utils');
 const {
   getSelectedSource,
   getSourceByURL,
   getBreakpoint,
   getBreakpoints,
--- a/devtools/client/debugger/utils.js
+++ b/devtools/client/debugger/utils.js
@@ -1,14 +1,15 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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/. */
 /* globals document, window */
+/* import-globals-from ./debugger-controller.js */
 "use strict";
 
 // Maps known URLs to friendly source group names and put them at the
 // bottom of source list.
 var KNOWN_SOURCE_GROUPS = {
   "Add-on SDK": "resource://gre/modules/commonjs/",
 };
 
--- a/devtools/client/framework/test/shared-redux-head.js
+++ b/devtools/client/framework/test/shared-redux-head.js
@@ -1,18 +1,18 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 /* eslint no-unused-vars: [2, {"vars": "local"}] */
+/* import-globals-from ./shared-head.js */
 // Currently this file expects "promise" to be imported into scope.
-/* globals promise */
 
 // Common utility functions for working with Redux stores.  The file is meant
 // to be safe to load in both mochitest and xpcshell environments.
 
 /**
  * A logging function that can be used from xpcshell and browser mochitest
  * environments.
  */
--- a/devtools/client/inspector/fonts/fonts.js
+++ b/devtools/client/inspector/fonts/fonts.js
@@ -5,16 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const {Cu} = require("chrome");
 const {setTimeout, clearTimeout} =
       Cu.import("resource://gre/modules/Timer.jsm", {});
 const {gDevTools} = require("devtools/client/framework/devtools");
+const Services = require("Services");
 
 const DEFAULT_PREVIEW_TEXT = "Abc";
 const PREVIEW_UPDATE_DELAY = 150;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Task",
   "resource://gre/modules/Task.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "console",
--- a/devtools/client/inspector/markup/markup.js
+++ b/devtools/client/inspector/markup/markup.js
@@ -23,16 +23,17 @@ const AUTOCOMPLETE_POPUP_PANEL_ID = "mar
 const ATTR_COLLAPSE_ENABLED_PREF = "devtools.markup.collapseAttributes";
 const ATTR_COLLAPSE_LENGTH_PREF = "devtools.markup.collapseAttributeLength";
 
 const {UndoStack} = require("devtools/client/shared/undo");
 const {editableField, InplaceEditor} =
       require("devtools/client/shared/inplace-editor");
 const {HTMLEditor} = require("devtools/client/inspector/markup/html-editor");
 const promise = require("promise");
+const Services = require("Services");
 const {Tooltip} = require("devtools/client/shared/widgets/Tooltip");
 const EventEmitter = require("devtools/shared/event-emitter");
 const Heritage = require("sdk/core/heritage");
 const {setTimeout, clearTimeout, setInterval, clearInterval} =
       require("sdk/timers");
 const {parseAttribute} =
       require("devtools/client/shared/node-attribute-parser");
 const ELLIPSIS = Services.prefs.getComplexValue("intl.ellipsis",
--- a/devtools/client/inspector/rules/views/rule-editor.js
+++ b/devtools/client/inspector/rules/views/rule-editor.js
@@ -21,16 +21,17 @@ const {
 const {
   parseDeclarations,
   parsePseudoClassesAndAttributes,
   SELECTOR_ATTRIBUTE,
   SELECTOR_ELEMENT,
   SELECTOR_PSEUDO_CLASS
 } = require("devtools/client/shared/css-parsing-utils");
 const promise = require("promise");
+const Services = require("Services");
 const EventEmitter = require("devtools/shared/event-emitter");
 
 XPCOMUtils.defineLazyGetter(this, "_strings", function() {
   return Services.strings.createBundle(
     "chrome://devtools-shared/locale/styleinspector.properties");
 });
 
 const HTML_NS = "http://www.w3.org/1999/xhtml";
--- a/devtools/client/jsonview/test/doc_frame_script.js
+++ b/devtools/client/jsonview/test/doc_frame_script.js
@@ -1,14 +1,16 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
+/* globals Services, sendAsyncMessage, addMessageListener */
+
 // XXX Some helper API could go to testing/mochitest/tests/SimpleTest/AsyncContentUtils.js
 // (or at least to share test API in devtools)
 
 // 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.
 let EventUtils = {};
 EventUtils.window = content;
--- a/devtools/client/jsonview/utils.js
+++ b/devtools/client/jsonview/utils.js
@@ -2,16 +2,17 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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, Cc, Ci} = require("chrome");
+const Services = require("Services");
 const {getMostRecentBrowserWindow} = require("sdk/window/utils");
 
 const OPEN_FLAGS = {
   RDONLY: parseInt("0x01"),
   WRONLY: parseInt("0x02"),
   CREATE_FILE: parseInt("0x08"),
   APPEND: parseInt("0x10"),
   TRUNCATE: parseInt("0x20"),
--- a/devtools/client/responsivedesign/responsivedesign-child.js
+++ b/devtools/client/responsivedesign/responsivedesign-child.js
@@ -1,16 +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";
 
 /* global content, docShell, addEventListener, addMessageListener,
-   removeEventListener, removeMessageListener, sendAsyncMessage */
+   removeEventListener, removeMessageListener, sendAsyncMessage, Services */
 
 var global = this;
 
 // Guard against loading this frame script mutiple times
 (function() {
   if (global.responsiveFrameScriptLoaded) {
     return;
   }
--- a/devtools/client/webaudioeditor/views/context.js
+++ b/devtools/client/webaudioeditor/views/context.js
@@ -1,13 +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";
 
+/* import-globals-from ../includes.js */
+
 const { debounce } = require("sdk/lang/functional");
 
 // Globals for d3 stuff
 // Default properties of the graph on rerender
 const GRAPH_DEFAULTS = {
   translate: [20, 20],
   scale: 1
 };
--- a/devtools/client/webaudioeditor/views/inspector.js
+++ b/devtools/client/webaudioeditor/views/inspector.js
@@ -1,13 +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";
 
+/* import-globals-from ../includes.js */
+
 const MIN_INSPECTOR_WIDTH = 300;
 
 // Strings for rendering
 const EXPAND_INSPECTOR_STRING = L10N.getStr("expandInspector");
 const COLLAPSE_INSPECTOR_STRING = L10N.getStr("collapseInspector");
 
 /**
  * Functions handling the audio node inspector UI.
--- a/devtools/shared/gcli/commands/highlight.js
+++ b/devtools/shared/gcli/commands/highlight.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";
 
 const l10n = require("gcli/l10n");
+const Services = require("Services");
 require("devtools/server/actors/inspector");
 const {
   BoxModelHighlighter,
   HighlighterEnvironment
 } = require("devtools/server/actors/highlighters");
 
 XPCOMUtils.defineLazyGetter(this, "nodesSelected", function() {
   return Services.strings.createBundle("chrome://devtools-shared/locale/gclicommands.properties");
--- a/devtools/shared/webconsole/network-helper.js
+++ b/devtools/shared/webconsole/network-helper.js
@@ -52,16 +52,17 @@
  *  Mihai Sucan (Mozilla Corp.)
  */
 
 "use strict";
 
 const {components, Cc, Ci, Cu} = require("chrome");
 loader.lazyImporter(this, "NetUtil", "resource://gre/modules/NetUtil.jsm");
 const DevToolsUtils = require("devtools/shared/DevToolsUtils");
+const Services = require("Services");
 
 // The cache used in the `nsIURL` function.
 const gNSURLStore = new Map();
 
 /**
  * Helper object for networking stuff.
  *
  * Most of the following functions have been taken from the Firebug source. They