Bug 1443457 - Stop referencing the addon-sdk loader in devtools code r=jdescottes
authorMichael Ratcliffe <mratcliffe@mozilla.com>
Fri, 09 Mar 2018 15:36:45 +0000
changeset 408117 b98d3bc2333f951e81fe04f1f1f6959c0a1f5317
parent 408116 5b4fefc4bb907786c3bc2fc81aad9515a5307864
child 408118 9ddcc7fdda30b289a0ef9592151293e006b024ab
push id33627
push userapavel@mozilla.com
push dateWed, 14 Mar 2018 22:06:06 +0000
treeherdermozilla-central@7dad306cf8fe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1443457
milestone61.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 1443457 - Stop referencing the addon-sdk loader in devtools code r=jdescottes MozReview-Commit-ID: 7lwCG8JT7cV
devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon3/lib/main.js
devtools/client/framework/devtools-browser.js
devtools/client/framework/devtools.js
devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
devtools/client/webconsole/new-console-output/test/mochitest/browser_console_addonsdk_loader_exception.js
devtools/client/webconsole/new-console-output/test/mochitest/browser_console_devtools_loader_exception.js
devtools/client/webconsole/test/browser.ini
devtools/client/webconsole/test/browser_console_addonsdk_loader_exception.js
devtools/client/webconsole/test/browser_console_devtools_loader_exception.js
devtools/server/main.js
devtools/server/tests/mochitest/test_getProcess.html
devtools/shared/base-loader.js
devtools/shared/builtin-modules.js
testing/runtimes/mochitest-devtools-chrome-e10s.runtimes.json
--- a/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon3/lib/main.js
+++ b/devtools/client/debugger/test/mochitest/addon-source/browser_dbg_addon3/lib/main.js
@@ -4,17 +4,17 @@ var observerService = Cc["@mozilla.org/o
 var observer = {
   observe: function () {
     debugger;
   }
 };
 
 observerService.addObserver(observer, "debuggerAttached");
 
-var sdkLoaderDestroyObserver = {
+var devtoolsLoaderDestroyObserver = {
   observe: function () {
-    // Remove all observers on sdk:loader:destroy
+    // Remove all observers on devtools:loader:destroy
     observerService.removeObserver(observer, "debuggerAttached");
-    observerService.removeObserver(sdkLoaderDestroyObserver, "sdk:loader:destroy");
+    observerService.removeObserver(devtoolsLoaderDestroyObserver, "devtools:loader:destroy");
   }
 };
 
-observerService.addObserver(sdkLoaderDestroyObserver, "sdk:loader:destroy");
+observerService.addObserver(devtoolsLoaderDestroyObserver, "devtools:loader:destroy");
--- a/devtools/client/framework/devtools-browser.js
+++ b/devtools/client/framework/devtools-browser.js
@@ -173,17 +173,17 @@ var gDevToolsBrowser = exports.gDevTools
           for (let win of this._trackedBrowserWindows) {
             this.updateDevtoolsThemeAttribute(win);
           }
         }
         break;
       case "quit-application":
         gDevToolsBrowser.destroy({ shuttingDown: true });
         break;
-      case "sdk:loader:destroy":
+      case "devtools:loader:destroy":
         // This event is fired when the devtools loader unloads, which happens
         // only when the add-on workflow ask devtools to be reloaded.
         if (subject.wrappedJSObject == require("@loader/unload")) {
           gDevToolsBrowser.destroy({ shuttingDown: false });
         }
         break;
     }
   },
@@ -706,29 +706,29 @@ var gDevToolsBrowser = exports.gDevTools
       case "unload":
         // top-level browser window unload
         gDevToolsBrowser._forgetBrowserWindow(event.target.defaultView);
         break;
     }
   },
 
   /**
-   * Either the SDK Loader has been destroyed by the add-on contribution
+   * Either the DevTools Loader has been destroyed by the add-on contribution
    * workflow, or firefox is shutting down.
 
    * @param {boolean} shuttingDown
    *        True if firefox is currently shutting down. We may prevent doing
    *        some cleanups to speed it up. Otherwise everything need to be
    *        cleaned up in order to be able to load devtools again.
    */
   destroy({ shuttingDown }) {
     Services.prefs.removeObserver("devtools.", gDevToolsBrowser);
     Services.obs.removeObserver(gDevToolsBrowser, "browser-delayed-startup-finished");
     Services.obs.removeObserver(gDevToolsBrowser, "quit-application");
-    Services.obs.removeObserver(gDevToolsBrowser, "sdk:loader:destroy");
+    Services.obs.removeObserver(gDevToolsBrowser, "devtools:loader:destroy");
 
     for (let win of gDevToolsBrowser._trackedBrowserWindows) {
       gDevToolsBrowser._forgetBrowserWindow(win);
     }
 
     // Remove scripts loaded in content process to support the Browser Content Toolbox.
     DebuggerServer.removeContentServerScript();
 
@@ -754,17 +754,17 @@ gDevTools.on("tool-unregistered", functi
 });
 
 gDevTools.on("toolbox-ready", gDevToolsBrowser._updateMenuCheckbox);
 gDevTools.on("toolbox-destroyed", gDevToolsBrowser._updateMenuCheckbox);
 
 Services.obs.addObserver(gDevToolsBrowser, "quit-application");
 Services.obs.addObserver(gDevToolsBrowser, "browser-delayed-startup-finished");
 // Watch for module loader unload. Fires when the tools are reloaded.
-Services.obs.addObserver(gDevToolsBrowser, "sdk:loader:destroy");
+Services.obs.addObserver(gDevToolsBrowser, "devtools:loader:destroy");
 
 // Fake end of browser window load event for all already opened windows
 // that is already fully loaded.
 let enumerator = Services.wm.getEnumerator(gDevTools.chromeWindowType);
 while (enumerator.hasMoreElements()) {
   let win = enumerator.getNext();
   if (win.gBrowserInit && win.gBrowserInit.delayedStartupFinished) {
     gDevToolsBrowser._registerBrowserWindow(win);
--- a/devtools/client/framework/devtools.js
+++ b/devtools/client/framework/devtools.js
@@ -650,17 +650,17 @@ DevTools.prototype = {
 
     await onNewNode;
     // Now that the node has been selected, wait until the inspector is
     // fully updated.
     await inspector.once("inspector-updated");
   },
 
   /**
-   * Either the SDK Loader has been destroyed by the add-on contribution
+   * Either the DevTools Loader has been destroyed by the add-on contribution
    * workflow, or firefox is shutting down.
 
    * @param {boolean} shuttingDown
    *        True if firefox is currently shutting down. We may prevent doing
    *        some cleanups to speed it up. Otherwise everything need to be
    *        cleaned up in order to be able to load devtools again.
    */
   destroy({ shuttingDown }) {
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
@@ -161,22 +161,22 @@ support-files =
   testscript.js
   !/devtools/client/netmonitor/test/sjs_cors-test-server.sjs
   !/image/test/mochitest/blue.png
   !/devtools/client/shared/test/shared-head.js
   !/devtools/client/shared/test/test-actor.js
   !/devtools/client/shared/test/test-actor-registry.js
 
 [browser_console.js]
-[browser_console_addonsdk_loader_exception.js]
 [browser_console_clear_method.js]
 skip-if = true # Bug 1437843
 [browser_console_consolejsm_output.js]
 [browser_console_context_menu_entries.js]
 [browser_console_dead_objects.js]
+[browser_console_devtools_loader_exception.js]
 [browser_console_error_source_click.js]
 [browser_console_filters.js]
 [browser_console_nsiconsolemessage.js]
 [browser_console_open_or_focus.js]
 [browser_console_restore.js]
 [browser_console_webconsole_console_api_calls.js]
 [browser_console_webconsole_ctrlw_close_tab.js]
 [browser_console_webconsole_iframe_messages.js]
rename from devtools/client/webconsole/new-console-output/test/mochitest/browser_console_addonsdk_loader_exception.js
rename to devtools/client/webconsole/new-console-output/test/mochitest/browser_console_devtools_loader_exception.js
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser_console_addonsdk_loader_exception.js
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser_console_devtools_loader_exception.js
@@ -1,31 +1,31 @@
 /* -*- 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/ */
 
 /* import-globals-from head.js */
 
-// Check that exceptions from scripts loaded with the addon-sdk loader are
+// Check that exceptions from scripts loaded with the DevTools loader are
 // opened correctly in View Source from the Browser Console.
 
 "use strict";
 
 const TEST_URI =
-  "data:text/html;charset=utf8,<p>browser_console_addonsdk_loader_exception.js</p>";
+  "data:text/html;charset=utf8,<p>browser_console_devtools_loader_exception.js</p>";
 
 add_task(async function() {
   let wcHud = await openNewTabAndConsole(TEST_URI);
   ok(wcHud, "web console opened");
 
   let bcHud = await HUDService.toggleBrowserConsole();
   ok(bcHud, "browser console opened");
 
-  // Cause an exception in a script loaded with the addon-sdk loader.
+  // Cause an exception in a script loaded with the DevTools loader.
   let toolbox = gDevTools.getToolbox(wcHud.target);
   let oldPanels = toolbox._toolPanels;
   // non-iterable
   toolbox._toolPanels = {};
 
   function fixToolbox() {
     toolbox._toolPanels = oldPanels;
   }
--- a/devtools/client/webconsole/test/browser.ini
+++ b/devtools/client/webconsole/test/browser.ini
@@ -155,30 +155,30 @@ skip-if = (os == 'linux' && bits == 32 &
 [browser_bug_862916_console_dir_and_filter_off.js]
 skip-if = (e10s && (os == 'win' || os == 'mac')) # Bug 1243976
 [browser_bug_865288_repeat_different_objects.js]
 [browser_bug_865871_variables_view_close_on_esc_key.js]
 [browser_bug_869003_inspect_cross_domain_object.js]
 [browser_bug_871156_ctrlw_close_tab.js]
 [browser_cached_messages.js]
 [browser_console.js]
-[browser_console_addonsdk_loader_exception.js]
 [browser_console_certificate_imminent_distrust.js]
 [browser_console_clear_method.js]
 [browser_console_clear_on_reload.js]
 [browser_console_click_focus.js]
 [browser_console_consolejsm_output.js]
 [browser_console_copy_command.js]
 subsuite = clipboard
 skip-if = (os == 'linux' && bits == 32 && debug) # bug 1328915, disable linux32 debug devtools for timeouts
 [browser_console_dead_objects.js]
 skip-if = e10s # Bug 1042253 - webconsole tests disabled with e10s
 [browser_console_copy_entire_message_context_menu.js]
 subsuite = clipboard
 skip-if = (os == 'linux' && bits == 32 && debug) # bug 1328915, disable linux32 debug devtools for timeouts
+[browser_console_devtools_loader_exception.js]
 [browser_console_error_source_click.js]
 [browser_console_filters.js]
 [browser_console_iframe_messages.js]
 [browser_console_keyboard_accessibility.js]
 [browser_console_log_inspectable_object.js]
 [browser_console_native_getters.js]
 [browser_console_navigation_marker.js]
 [browser_console_netlogging.js]
rename from devtools/client/webconsole/test/browser_console_addonsdk_loader_exception.js
rename to devtools/client/webconsole/test/browser_console_devtools_loader_exception.js
--- a/devtools/client/webconsole/test/browser_console_addonsdk_loader_exception.js
+++ b/devtools/client/webconsole/test/browser_console_devtools_loader_exception.js
@@ -1,14 +1,14 @@
 /* -*- 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/ */
 
-// Check that exceptions from scripts loaded with the addon-sdk loader are
+// Check that exceptions from scripts loaded with the DevTools loader are
 // opened correctly in View Source from the Browser Console.
 // See bug 866950.
 
 "use strict";
 
 const TEST_URI = "data:text/html;charset=utf8,<p>hello world from bug 866950";
 
 function test() {
@@ -21,17 +21,17 @@ function test() {
   function* runner() {
     let {tab} = yield loadTab(TEST_URI);
     webconsole = yield openConsole(tab);
     ok(webconsole, "web console opened");
 
     browserconsole = yield HUDService.toggleBrowserConsole();
     ok(browserconsole, "browser console opened");
 
-    // Cause an exception in a script loaded with the addon-sdk loader.
+    // Cause an exception in a script loaded with the DevTools loader.
     let toolbox = gDevTools.getToolbox(webconsole.target);
     let oldPanels = toolbox._toolPanels;
     // non-iterable
     toolbox._toolPanels = {};
 
     function fixToolbox() {
       toolbox._toolPanels = oldPanels;
     }
--- a/devtools/server/main.js
+++ b/devtools/server/main.js
@@ -26,17 +26,17 @@ DevToolsUtils.defineLazyGetter(this, "Au
   return require("devtools/shared/security/auth");
 });
 DevToolsUtils.defineLazyGetter(this, "generateUUID", () => {
   let { generateUUID } = Cc["@mozilla.org/uuid-generator;1"]
                            .getService(Ci.nsIUUIDGenerator);
   return generateUUID;
 });
 
-// Overload `Components` to prevent SDK loader exception on Components
+// Overload `Components` to prevent DevTools loader exception on Components
 // object usage
 Object.defineProperty(this, "Components", {
   get() {
     return require("chrome").components;
   }
 });
 
 if (isWorker) {
--- a/devtools/server/tests/mochitest/test_getProcess.html
+++ b/devtools/server/tests/mochitest/test_getProcess.html
@@ -1,9 +1,9 @@
-<SDOCTYPv HTM.>
+<!DOCTYPE HTML>
 <html>
 <!--
 Bug 1060093 - Test DebuggerServer.getProcess
 -->
 <head>
   <meta charset="utf-8">
   <title>Mozilla Bug</title>
   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
@@ -109,20 +109,20 @@ function runTests() {
          "Second call to getProcess with the same id returns the same form");
       closeClient();
     });
   }
 
   function processScript() {
     ChromeUtils.import("resource://gre/modules/Services.jsm");
     let listener = function() {
-      Services.obs.removeObserver(listener, "sdk:loader:destroy");
+      Services.obs.removeObserver(listener, "devtools:loader:destroy");
       sendAsyncMessage("test:getProcess-destroy", null);
     };
-    Services.obs.addObserver(listener, "sdk:loader:destroy");
+    Services.obs.addObserver(listener, "devtools:loader:destroy");
   }
 
   function closeClient() {
     let onLoaderDestroyed = new Promise(done => {
       let processListener = function() {
         Services.ppmm.removeMessageListener("test:getProcess-destroy", processListener);
         done();
       };
--- a/devtools/shared/base-loader.js
+++ b/devtools/shared/base-loader.js
@@ -566,17 +566,17 @@ function unload(loader, reason) {
   // subject is a unique object created per loader instance.
   // This allows any code to cleanup on loader unload regardless of how
   // it was loaded. To handle unload for specific loader subject may be
   // asserted against loader.destructor or require("@loader/unload")
   // Note: We don not destroy loader's module cache or sandboxes map as
   // some modules may do cleanup in subsequent turns of event loop. Destroying
   // cache may cause module identity problems in such cases.
   let subject = { wrappedJSObject: loader.destructor };
-  Services.obs.notifyObservers(subject, "sdk:loader:destroy", reason);
+  Services.obs.notifyObservers(subject, "devtools:loader:destroy", reason);
 }
 
 // Function makes new loader that can be used to load CommonJS modules.
 // Loader takes following options:
 // - `paths`: Mandatory dictionary of require path mapped to absolute URIs.
 //   Object keys are path prefix used in require(), values are URIs where each
 //   prefix should be mapped to.
 // - `sharedGlobal`: Boolean, if True, loads all module in a single, shared
--- a/devtools/shared/builtin-modules.js
+++ b/devtools/shared/builtin-modules.js
@@ -221,17 +221,17 @@ defineLazyGetter(exports.modules, "Debug
     "addDebuggerToGlobal(this);",
     sandbox
   );
   return sandbox.Debugger;
 });
 
 defineLazyGetter(exports.modules, "Timer", () => {
   let {setTimeout, clearTimeout} = require("resource://gre/modules/Timer.jsm");
-  // Do not return Cu.import result, as SDK loader would freeze Timer.jsm globals...
+  // Do not return Cu.import result, as DevTools loader would freeze Timer.jsm globals...
   return {
     setTimeout,
     clearTimeout
   };
 });
 
 defineLazyGetter(exports.modules, "xpcInspector", () => {
   return Cc["@mozilla.org/jsinspector;1"].getService(Ci.nsIJSInspector);
@@ -275,18 +275,18 @@ exports.globals = {
   },
   Node: Ci.nsIDOMNode,
   reportError: Cu.reportError,
   TextDecoder,
   TextEncoder,
   URL,
   XMLHttpRequest,
 };
-// SDK loader copy globals property descriptors on each module global object
-// so that we have to memoize them from here in order to instanciate each
+// DevTools loader copy globals property descriptors on each module global
+// object so that we have to memoize them from here in order to instantiate each
 // global only once.
 // `globals` is a cache object on which we put all global values
 // and we set getters on `exports.globals` returning `globals` values.
 let globals = {};
 function lazyGlobal(name, getter) {
   defineLazyGetter(globals, name, getter);
   Object.defineProperty(exports.globals, name, {
     get: function() {
--- a/testing/runtimes/mochitest-devtools-chrome-e10s.runtimes.json
+++ b/testing/runtimes/mochitest-devtools-chrome-e10s.runtimes.json
@@ -842,29 +842,29 @@
     "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_batching.js": 6416, 
     "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_filters.js": 5265, 
     "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_filters_persist.js": 7767, 
     "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_location_debugger_link.js": 5592, 
     "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_location_scratchpad_link.js": 4971, 
     "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_location_styleeditor_link.js": 4469, 
     "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_network_messages_click.js": 3871, 
     "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_nodes_select.js": 5570, 
-    "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_object_inspector_entries.js": 3676, 
+    "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_object_inspector_entries.js": 3676,
     "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_observer_notifications.js": 4639, 
     "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_scroll.js": 3616, 
     "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_sourcemap_error.js": 3529, 
     "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_sourcemap_nosource.js": 4008, 
     "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_stacktrace_location_debugger_link.js": 5160, 
     "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_stacktrace_location_scratchpad_link.js": 3645, 
     "devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_warn_about_replaced_api.js": 6869, 
     "devtools/client/webconsole/test/browser_bug664688_sandbox_update_after_navigation.js": 3934, 
     "devtools/client/webconsole/test/browser_cached_messages.js": 4512, 
-    "devtools/client/webconsole/test/browser_console_addonsdk_loader_exception.js": 3748, 
-    "devtools/client/webconsole/test/browser_console_consolejsm_output.js": 4138, 
-    "devtools/client/webconsole/test/browser_console_filters.js": 4025, 
+    "devtools/client/webconsole/test/browser_console_consolejsm_output.js": 4138,
+    "devtools/client/webconsole/test/browser_console_devtools_loader_exception.js": 3748,
+    "devtools/client/webconsole/test/browser_console_filters.js": 4025,
     "devtools/client/webconsole/test/browser_console_hide_jsterm_when_devtools_chrome_enabled_false.js": 9069, 
     "devtools/client/webconsole/test/browser_console_history_persist.js": 7397, 
     "devtools/client/webconsole/test/browser_console_iframe_messages.js": 5006, 
     "devtools/client/webconsole/test/browser_console_native_getters.js": 6389, 
     "devtools/client/webconsole/test/browser_console_nsiconsolemessage.js": 5074, 
     "devtools/client/webconsole/test/browser_console_optimized_out_vars.js": 4977, 
     "devtools/client/webconsole/test/browser_console_server_logging.js": 5339, 
     "devtools/client/webconsole/test/browser_console_variables_view.js": 4545, 
@@ -907,9 +907,9 @@
     "devtools/client/webconsole/test/browser_webconsole_split.js": 15452, 
     "devtools/client/webconsole/test/browser_webconsole_split_escape_key.js": 4380, 
     "devtools/client/webconsole/test/browser_webconsole_split_focus.js": 3758, 
     "devtools/client/webconsole/test/browser_webconsole_split_persist.js": 10510, 
     "devtools/client/webconsole/test/browser_webconsole_view_source.js": 5746, 
     "devtools/server/tests/browser/browser_markers-cycle-collection.js": 5381, 
     "devtools/server/tests/browser/browser_webextension_inspected_window.js": 5888
   }
-}
\ No newline at end of file
+}