Backed out changeset 61b922c31b12 (bug 993029)
authorEd Lee <edilee@mozilla.com>
Sun, 27 Apr 2014 00:20:36 -0700
changeset 198954 e5a01f84acc0ff71bea0db2a69ea1feedf43b584
parent 198953 61b922c31b12e08809e0787983aee5751c11c39a
child 198955 4e44a25ca81f1911b13aaf46f99730bedd275c22
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs993029
milestone31.0a1
backs out61b922c31b12e08809e0787983aee5751c11c39a
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
Backed out changeset 61b922c31b12 (bug 993029)
addon-sdk/source/lib/sdk/console/plain-text.js
addon-sdk/source/lib/toolkit/loader.js
browser/devtools/debugger/test/addon-source/browser_dbg_addon4/bootstrap.js
browser/devtools/debugger/test/addon4.xpi
browser/devtools/debugger/test/browser.ini
browser/devtools/debugger/test/browser_dbg_addon-console.js
browser/devtools/debugger/test/browser_dbg_addon-panels.js
browser/devtools/debugger/test/head.js
browser/devtools/framework/toolbox-process-window.js
browser/devtools/main.js
toolkit/devtools/Console.jsm
toolkit/devtools/server/actors/webbrowser.js
toolkit/devtools/server/actors/webconsole.js
toolkit/devtools/tests/unit/test_consoleID.js
toolkit/devtools/tests/unit/xpcshell.ini
toolkit/devtools/webconsole/utils.js
toolkit/mozapps/extensions/internal/XPIProvider.jsm
toolkit/mozapps/extensions/test/addons/bootstrap_globals/bootstrap.js
toolkit/mozapps/extensions/test/addons/bootstrap_globals/install.rdf
toolkit/mozapps/extensions/test/xpcshell/test_bootstrap_globals.js
toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini
--- a/addon-sdk/source/lib/sdk/console/plain-text.js
+++ b/addon-sdk/source/lib/sdk/console/plain-text.js
@@ -45,18 +45,17 @@ branch.addObserver(ADDON_LOG_LEVEL_PREF,
 branch.addObserver(SDK_LOG_LEVEL_PREF, logLevelObserver, true);
 
 function PlainTextConsole(print, innerID) {
 
   let consoleOptions = {
     prefix: self.name + ": ",
     maxLogLevel: logLevel,
     dump: print,
-    innerID: innerID,
-    consoleID: "addon/" + self.id
+    innerID: innerID
   };
   let console = new ConsoleAPI(consoleOptions);
 
   // As we freeze the console object, we can't modify this property afterward
   Object.defineProperty(console, "maxLogLevel", {
     get: function() {
       return logLevel;
     }
--- a/addon-sdk/source/lib/toolkit/loader.js
+++ b/addon-sdk/source/lib/toolkit/loader.js
@@ -35,17 +35,17 @@ const { classes: Cc, Constructor: CC, in
         results: Cr, manager: Cm } = Components;
 const systemPrincipal = CC('@mozilla.org/systemprincipal;1', 'nsIPrincipal')();
 const { loadSubScript } = Cc['@mozilla.org/moz/jssubscript-loader;1'].
                      getService(Ci.mozIJSSubScriptLoader);
 const { notifyObservers } = Cc['@mozilla.org/observer-service;1'].
                         getService(Ci.nsIObserverService);
 const { NetUtil } = Cu.import("resource://gre/modules/NetUtil.jsm", {});
 const { Reflect } = Cu.import("resource://gre/modules/reflect.jsm", {});
-const { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/Console.jsm");
+const { console } = Cu.import("resource://gre/modules/devtools/Console.jsm");
 const { join: pathJoin, normalize, dirname } = Cu.import("resource://gre/modules/osfile/ospath_unix.jsm");
 
 // Define some shortcuts.
 const bind = Function.call.bind(Function.bind);
 const getOwnPropertyNames = Object.getOwnPropertyNames;
 const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
 const define = Object.defineProperties;
 const prototypeOf = Object.getPrototypeOf;
@@ -683,20 +683,16 @@ exports.unload = unload;
 //   These modules will incorporated into module cache. Each module will be
 //   frozen.
 // - `resolve` Optional module `id` resolution function. If given it will be
 //   used to resolve module URIs, by calling it with require term, requirer
 //   module object (that has `uri` property) and `baseURI` of the loader.
 //   If `resolve` does not returns `uri` string exception will be thrown by
 //   an associated `require` call.
 const Loader = iced(function Loader(options) {
-  let console = new ConsoleAPI({
-    consoleID: options.id ? "addon/" + options.id : ""
-  });
-
   let {
     modules, globals, resolve, paths, rootURI, manifest, requireMap, isNative
   } = override({
     paths: {},
     modules: {},
     globals: {
       console: console
     },
--- a/browser/devtools/debugger/test/addon-source/browser_dbg_addon4/bootstrap.js
+++ b/browser/devtools/debugger/test/addon-source/browser_dbg_addon4/bootstrap.js
@@ -1,34 +1,23 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-const { interfaces: Ci, classes: Cc, utils: Cu } = Components;
-
-function notify() {
-  // Log objects so makeDebuggeeValue can get the global to use
-  console.log({ msg: "Hello again" });
-}
+const { interfaces: Ci, classes: Cc } = Components;
 
 function startup(aParams, aReason) {
-  Cu.import("resource://gre/modules/Services.jsm");
+  Components.utils.import("resource://gre/modules/Services.jsm");
   let res = Services.io.getProtocolHandler("resource")
                        .QueryInterface(Ci.nsIResProtocolHandler);
   res.setSubstitution("browser_dbg_addon4", aParams.resourceURI);
 
   // Load a JS module
-  Cu.import("resource://browser_dbg_addon4/test.jsm");
-  // Log objects so makeDebuggeeValue can get the global to use
-  console.log({ msg: "Hello from the test add-on" });
-
-  Services.obs.addObserver(notify, "addon-test-ping", false);
+  Components.utils.import("resource://browser_dbg_addon4/test.jsm");
 }
 
 function shutdown(aParams, aReason) {
-  Services.obs.removeObserver(notify, "addon-test-ping");
-
   // Unload the JS module
-  Cu.unload("resource://browser_dbg_addon4/test.jsm");
+  Components.utils.unload("resource://browser_dbg_addon4/test.jsm");
 
   let res = Services.io.getProtocolHandler("resource")
                        .QueryInterface(Ci.nsIResProtocolHandler);
   res.setSubstitution("browser_dbg_addon4", null);
 }
index 56dc98f6e01e766f60b9eeb08c5ce4a3c56d4b02..31c5331b69dee6d15183647bb598f90195ff1c2a
GIT binary patch
literal 2918
zc$^FHW@Zs#U}E54@a?a132>Y;EtQdhA)J|kfrmkcAt^t<q`0Igu|O}YI5dQlfq7H8
zaW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XP3
zA+)f$zV(^=_t);_3`p^X=4@_+vyEWx)&aU%YtXox3+QeJa60>@-!NSk$Od74pu3YZ
zit=+)^>P#QGSh%wz?a&R^Ycnl^GXzwit@{gQ;XtLlG5W7Q&RHtOceCE0=yZS<d|_a
zKO`7H0LW!n(g<RqHbz(>MHHHK=q94plE@~m22v<>CUFL$)&R%`DgYggs1JxU4YdeH
zHtj9cG$Ue-!z=@ljoZz_fK(!~LZXX+X{e<OvT5sC8Ia2w!p33dS!Cl@urZ+IU{**D
z#^*eY%!F)SJUatw)?$TZEvyFOO6AA~igPevrg>bxW@Tdl$0jGkWuVEm93UP5@Gl)6
--- a/browser/devtools/debugger/test/browser.ini
+++ b/browser/devtools/debugger/test/browser.ini
@@ -85,17 +85,16 @@ support-files =
   testactors.js
 
 [browser_dbg_aaa_run_first_leaktest.js]
 [browser_dbg_addonactor.js]
 [browser_dbg_addon-sources.js]
 [browser_dbg_addon-modules.js]
 [browser_dbg_addon-modules-unpacked.js]
 [browser_dbg_addon-panels.js]
-[browser_dbg_addon-console.js]
 [browser_dbg_auto-pretty-print-01.js]
 [browser_dbg_auto-pretty-print-02.js]
 [browser_dbg_bfcache.js]
 [browser_dbg_blackboxing-01.js]
 [browser_dbg_blackboxing-02.js]
 [browser_dbg_blackboxing-03.js]
 [browser_dbg_blackboxing-04.js]
 [browser_dbg_blackboxing-05.js]
deleted file mode 100644
--- a/browser/devtools/debugger/test/browser_dbg_addon-console.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Test that the we can see console messages from the add-on
-
-const ADDON_URL = EXAMPLE_URL + "addon4.xpi";
-
-function getCachedMessages(webConsole) {
-  let deferred = promise.defer();
-  webConsole.getCachedMessages(["ConsoleAPI"], (aResponse) => {
-    if (aResponse.error) {
-      deferred.reject(aResponse.error);
-      return;
-    }
-    deferred.resolve(aResponse.messages);
-  });
-  return deferred.promise;
-}
-
-function test() {
-  Task.spawn(function () {
-    let addon = yield addAddon(ADDON_URL);
-    let addonDebugger = yield initAddonDebugger(ADDON_URL);
-
-    let webConsole = addonDebugger.webConsole;
-    let messages = yield getCachedMessages(webConsole);
-    is(messages.length, 1, "Should be one cached message");
-    is(messages[0].arguments[0].type, "object", "Should have logged an object");
-    is(messages[0].arguments[0].preview.ownProperties.msg.value, "Hello from the test add-on", "Should have got the right message");
-
-    let consolePromise = addonDebugger.once("console");
-
-    console.log("Bad message");
-    Services.obs.notifyObservers(null, "addon-test-ping", "");
-
-    let messageGrip = yield consolePromise;
-    is(messageGrip.arguments[0].type, "object", "Should have logged an object");
-    is(messageGrip.arguments[0].preview.ownProperties.msg.value, "Hello again", "Should have got the right message");
-
-    yield addonDebugger.destroy();
-    yield removeAddon(addon);
-    finish();
-  });
-}
--- a/browser/devtools/debugger/test/browser_dbg_addon-panels.js
+++ b/browser/devtools/debugger/test/browser_dbg_addon-panels.js
@@ -21,19 +21,19 @@ function test() {
     // Store and enable all optional dev tools panels
     let originalPrefs = PREFS.map(pref => {
       let original = Services.prefs.getBoolPref(pref);
       Services.prefs.setBoolPref(pref, true)
       return original;
     });
 
     let tabs = addonDebugger.frame.contentDocument.getElementById("toolbox-tabs").children;
-    let expectedTabs = ["options", "webconsole", "jsdebugger", "scratchpad"];
+    let expectedTabs = ["options", "jsdebugger"];
 
-    is(tabs.length, expectedTabs.length, "displaying only " + expectedTabs.length + " tabs in addon debugger");
+    is(tabs.length, 2, "displaying only 2 tabs in addon debugger");
     Array.forEach(tabs, (tab, i) => {
       let toolName = expectedTabs[i];
       is(tab.getAttribute("toolid"), toolName, "displaying " + toolName);
     });
 
     yield addonDebugger.destroy();
     yield removeAddon(addon);
 
--- a/browser/devtools/debugger/test/head.js
+++ b/browser/devtools/debugger/test/head.js
@@ -17,17 +17,16 @@ let { Promise: promise } = Cu.import("re
 let { gDevTools } = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
 let { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
 let { require } = devtools;
 let { DevToolsUtils } = Cu.import("resource://gre/modules/devtools/DevToolsUtils.jsm", {});
 let { BrowserToolboxProcess } = Cu.import("resource:///modules/devtools/ToolboxProcess.jsm", {});
 let { DebuggerServer } = Cu.import("resource://gre/modules/devtools/dbg-server.jsm", {});
 let { DebuggerClient } = Cu.import("resource://gre/modules/devtools/dbg-client.jsm", {});
 let { AddonManager } = Cu.import("resource://gre/modules/AddonManager.jsm", {});
-let EventEmitter = require("devtools/toolkit/event-emitter");
 const { promiseInvoke } = require("devtools/async-utils");
 let TargetFactory = devtools.TargetFactory;
 let Toolbox = devtools.Toolbox;
 
 const EXAMPLE_URL = "http://example.com/browser/browser/devtools/debugger/test/";
 
 gDevTools.testing = true;
 SimpleTest.registerCleanupFunction(() => {
@@ -518,18 +517,16 @@ function initDebugger(aTarget, aWindow) 
 // object must be destroyed before finishing the test
 function initAddonDebugger(aUrl) {
   let addonDebugger = new AddonDebugger();
   return addonDebugger.init(aUrl).then(() => addonDebugger);
 }
 
 function AddonDebugger() {
   this._onMessage = this._onMessage.bind(this);
-  this._onConsoleAPICall = this._onConsoleAPICall.bind(this);
-  EventEmitter.decorate(this);
 }
 
 AddonDebugger.prototype = {
   init: Task.async(function*(aUrl) {
     info("Initializing an addon debugger panel.");
 
     if (!DebuggerServer.initialized) {
       DebuggerServer.init(() => true);
@@ -546,72 +543,46 @@ AddonDebugger.prototype = {
 
     let connected = promise.defer();
     this.client.connect(connected.resolve);
     yield connected.promise;
 
     let addonActor = yield getAddonActorForUrl(this.client, aUrl);
 
     let targetOptions = {
-      form: {
-        addonActor: addonActor.actor,
-        consoleActor: addonActor.consoleActor,
-        title: addonActor.name
-      },
+      form: { addonActor: addonActor.actor, title: addonActor.name },
       client: this.client,
       chrome: true
     };
 
     let toolboxOptions = {
       customIframe: this.frame
     };
 
-    this.target = devtools.TargetFactory.forTab(targetOptions);
-    let toolbox = yield gDevTools.showToolbox(this.target, "jsdebugger", devtools.Toolbox.HostType.CUSTOM, toolboxOptions);
+    let target = devtools.TargetFactory.forTab(targetOptions);
+    let toolbox = yield gDevTools.showToolbox(target, "jsdebugger", devtools.Toolbox.HostType.CUSTOM, toolboxOptions);
 
     info("Addon debugger panel shown successfully.");
 
     this.debuggerPanel = toolbox.getCurrentPanel();
 
     // Wait for the initial resume...
     yield waitForClientEvents(this.debuggerPanel, "resumed");
     yield prepareDebugger(this.debuggerPanel);
-    yield this._attachConsole();
   }),
 
   destroy: Task.async(function*() {
     let deferred = promise.defer();
     this.client.close(deferred.resolve);
     yield deferred.promise;
     yield this.debuggerPanel._toolbox.destroy();
     this.frame.remove();
     window.removeEventListener("message", this._onMessage);
   }),
 
-  _attachConsole: function() {
-    let deferred = promise.defer();
-    this.client.attachConsole(this.target.form.consoleActor, ["ConsoleAPI"], (aResponse, aWebConsoleClient) => {
-      if (aResponse.error) {
-        deferred.reject(aResponse);
-      }
-      else {
-        this.webConsole = aWebConsoleClient;
-        this.client.addListener("consoleAPICall", this._onConsoleAPICall);
-        deferred.resolve();
-      }
-    });
-    return deferred.promise;
-  },
-
-  _onConsoleAPICall: function(aType, aPacket) {
-    if (aPacket.from != this.webConsole.actor)
-      return;
-    this.emit("console", aPacket.message);
-  },
-
   /**
    * Returns a list of the groups and sources in the UI. The returned array
    * contains objects for each group with properties name and sources. The
    * sources property contains an array with objects for each source for that
    * group with properties label and url.
    */
   getSourceGroups: Task.async(function*() {
     let debuggerWin = this.debuggerPanel.panelWin;
--- a/browser/devtools/framework/toolbox-process-window.js
+++ b/browser/devtools/framework/toolbox-process-window.js
@@ -32,21 +32,17 @@ function connect() {
   );
   gClient = new DebuggerClient(transport);
   gClient.connect(() => {
     let addonID = getParameterByName("addonID");
 
     if (addonID) {
       gClient.listAddons(({addons}) => {
         let addonActor = addons.filter(addon => addon.id === addonID).pop();
-        openToolbox({
-          addonActor: addonActor.actor,
-          consoleActor: addonActor.consoleActor,
-          title: addonActor.name
-        });
+        openToolbox({ addonActor: addonActor.actor, title: addonActor.name });
       });
     } else {
       gClient.listTabs(openToolbox);
     }
   });
 }
 
 window.addEventListener("load", connect);
--- a/browser/devtools/main.js
+++ b/browser/devtools/main.js
@@ -100,17 +100,17 @@ Tools.webConsole = {
   onkey: function(panel, toolbox) {
     if (toolbox.splitConsole)
       return toolbox.focusConsoleInput();
 
     panel.focusInput();
   },
 
   isTargetSupported: function(target) {
-    return true;
+    return !target.isAddon;
   },
   build: function(iframeWindow, toolbox) {
     let panel = new WebConsolePanel(iframeWindow, toolbox);
     return panel.open();
   }
 };
 
 Tools.inspector = {
@@ -309,17 +309,17 @@ Tools.scratchpad = {
   invertIconForLightTheme: true,
   url: "chrome://browser/content/devtools/scratchpad.xul",
   label: l10n("scratchpad.label", scratchpadStrings),
   tooltip: l10n("scratchpad.tooltip", scratchpadStrings),
   inMenu: false,
   commands: "devtools/scratchpad/scratchpad-commands",
 
   isTargetSupported: function(target) {
-    return target.isRemote;
+    return !target.isAddon && target.isRemote;
   },
 
   build: function(iframeWindow, toolbox) {
     let panel = new ScratchpadPanel(iframeWindow, toolbox);
     return panel.open();
   }
 };
 
--- a/toolkit/devtools/Console.jsm
+++ b/toolkit/devtools/Console.jsm
@@ -521,17 +521,16 @@ function createMultiLineDumper(aLevel) {
  *        - stacktrace: for trace(). Holds the array of stack frames as given by
  *        getStack().
  */
 function sendConsoleAPIMessage(aConsole, aLevel, aFrame, aArgs, aOptions = {})
 {
   let consoleEvent = {
     ID: "jsm",
     innerID: aConsole.innerID || aFrame.filename,
-    consoleID: aConsole.consoleID,
     level: aLevel,
     filename: aFrame.filename,
     lineNumber: aFrame.lineNumber,
     functionName: aFrame.functionName,
     timeStamp: Date.now(),
     arguments: aArgs,
   };
 
@@ -578,29 +577,26 @@ function sendConsoleAPIMessage(aConsole,
  *                            messages are logged based on their log level.
  *                            If falsy value, all messages will be logged.
  *                            If wrong value that doesn't match any key of
  *                            LOG_LEVELS, no message will be logged
  *        - dump {function} : An optional function to intercept all strings
  *                            written to stdout
  *        - innerID {string}: An ID representing the source of the message.
  *                            Normally the inner ID of a DOM window.
- *        - consoleID {string} : String identified for the console, this will
- *                            be passed through the console notifications
  * @return {object}
  *        A console API instance object
  */
 function ConsoleAPI(aConsoleOptions = {}) {
   // Normalize console options to set default values
   // in order to avoid runtime checks on each console method call.
   this.dump = aConsoleOptions.dump || dump;
   this.prefix = aConsoleOptions.prefix || "";
   this.maxLogLevel = aConsoleOptions.maxLogLevel || "all";
   this.innerID = aConsoleOptions.innerID || null;
-  this.consoleID = aConsoleOptions.consoleID || "";
 
   // Bind all the functions to this object.
   for (let prop in this) {
     if (typeof(this[prop]) === "function") {
       this[prop] = this[prop].bind(this);
     }
   }
 }
--- a/toolkit/devtools/server/actors/webbrowser.js
+++ b/toolkit/devtools/server/actors/webbrowser.js
@@ -1215,18 +1215,17 @@ BrowserAddonList.prototype.onInstalled =
 BrowserAddonList.prototype.onUninstalled = function (aAddon) {
   this._actorByAddonId.delete(aAddon.id);
   this._onListChanged();
 };
 
 function BrowserAddonActor(aConnection, aAddon) {
   this.conn = aConnection;
   this._addon = aAddon;
-  this._contextPool = new ActorPool(this.conn);
-  this.conn.addActorPool(this._contextPool);
+  this._contextPool = null;
   this._threadActor = null;
   this._global = null;
   AddonManager.addAddonListener(this);
 }
 
 BrowserAddonActor.prototype = {
   actorPrefix: "addon",
 
@@ -1247,35 +1246,27 @@ BrowserAddonActor.prototype = {
   },
 
   get global() {
     return this._global;
   },
 
   form: function BAA_form() {
     dbg_assert(this.actorID, "addon should have an actorID.");
-    if (!this._consoleActor) {
-      this._consoleActor = new AddonConsoleActor(this._addon, this.conn, this);
-      this._contextPool.addActor(this._consoleActor);
-    }
 
     return {
       actor: this.actorID,
       id: this.id,
       name: this._addon.name,
       url: this.url,
       debuggable: this._addon.isDebuggable,
-      consoleActor: this._consoleActor.actorID,
     };
   },
 
   disconnect: function BAA_disconnect() {
-    this.conn.removeActorPool(this._contextPool);
-    this._contextPool = null;
-    this._consoleActor = null;
     this._addon = null;
     this._global = null;
     AddonManager.removeAddonListener(this);
   },
 
   setOptions: function BAA_setOptions(aOptions) {
     if ("global" in aOptions) {
       this._global = aOptions.global;
@@ -1304,30 +1295,34 @@ BrowserAddonActor.prototype = {
   },
 
   onAttach: function BAA_onAttach() {
     if (this.exited) {
       return { type: "exited" };
     }
 
     if (!this.attached) {
+      this._contextPool = new ActorPool(this.conn);
+      this.conn.addActorPool(this._contextPool);
+
       this._threadActor = new AddonThreadActor(this.conn, this,
                                                this._addon.id);
       this._contextPool.addActor(this._threadActor);
     }
 
     return { type: "tabAttached", threadActor: this._threadActor.actorID };
   },
 
   onDetach: function BAA_onDetach() {
     if (!this.attached) {
       return { error: "wrongState" };
     }
 
-    this._contextPool.remoteActor(this._threadActor);
+    this.conn.removeActorPool(this._contextPool);
+    this._contextPool = null;
 
     this._threadActor = null;
 
     return { type: "detached" };
   },
 
   preNest: function() {
     let e = Services.wm.getEnumerator(null);
--- a/toolkit/devtools/server/actors/webconsole.js
+++ b/toolkit/devtools/server/actors/webconsole.js
@@ -1314,17 +1314,16 @@ WebConsoleActor.prototype =
    */
   prepareConsoleMessageForRemote:
   function WCA_prepareConsoleMessageForRemote(aMessage)
   {
     let result = WebConsoleUtils.cloneObject(aMessage);
     delete result.wrappedJSObject;
     delete result.ID;
     delete result.innerID;
-    delete result.consoleID;
 
     result.arguments = Array.map(aMessage.arguments || [], (aObj) => {
       let dbgObj = this.makeDebuggeeValue(aObj, true);
       return this.createValueGrip(dbgObj);
     });
 
     result.styles = Array.map(aMessage.styles || [], (aString) => {
       return this.createValueGrip(aString);
@@ -1399,99 +1398,16 @@ WebConsoleActor.prototype.requestTypes =
   evaluateJS: WebConsoleActor.prototype.onEvaluateJS,
   autocomplete: WebConsoleActor.prototype.onAutocomplete,
   clearMessagesCache: WebConsoleActor.prototype.onClearMessagesCache,
   getPreferences: WebConsoleActor.prototype.onGetPreferences,
   setPreferences: WebConsoleActor.prototype.onSetPreferences,
   sendHTTPRequest: WebConsoleActor.prototype.onSendHTTPRequest
 };
 
-
-/**
- * The AddonConsoleActor implements capabilities needed for the add-on web
- * console feature.
- *
- * @constructor
- * @param object aAddon
- *        The add-on that this console watches.
- * @param object aConnection
- *        The connection to the client, DebuggerServerConnection.
- * @param object aParentActor
- *        The parent BrowserAddonActor actor.
- */
-function AddonConsoleActor(aAddon, aConnection, aParentActor)
-{
-  this.addon = aAddon;
-  WebConsoleActor.call(this, aConnection, aParentActor);
-}
-
-AddonConsoleActor.prototype = Object.create(WebConsoleActor.prototype);
-
-update(AddonConsoleActor.prototype, {
-  constructor: AddonConsoleActor,
-
-  actorPrefix: "addonConsole",
-
-  /**
-   * The add-on that this console watches.
-   */
-  addon: null,
-
-  /**
-   * The main add-on JS global
-   */
-  get window() {
-    return this.parentActor.global;
-  },
-
-  /**
-   * Destroy the current AddonConsoleActor instance.
-   */
-  disconnect: function ACA_disconnect()
-  {
-    WebConsoleActor.prototype.disconnect.call(this);
-    this.addon = null;
-  }
-
-  /**
-   * Handler for the "startListeners" request.
-   *
-   * @param object aRequest
-   *        The JSON request object received from the Web Console client.
-   * @return object
-   *         The response object which holds the startedListeners array.
-   */
-  onStartListeners: function ACA_onStartListeners(aRequest)
-  {
-    let startedListeners = [];
-
-    while (aRequest.listeners.length > 0) {
-      let listener = aRequest.listeners.shift();
-      switch (listener) {
-        case "ConsoleAPI":
-          if (!this.consoleAPIListener) {
-            this.consoleAPIListener =
-              new ConsoleAPIListener(null, this, "addon/" + this.addon.id);
-            this.consoleAPIListener.init();
-          }
-          startedListeners.push(listener);
-          break;
-      }
-    }
-    return {
-      startedListeners: startedListeners,
-      nativeConsoleAPI: true,
-      traits: this.traits,
-    };
-  },
-});
-
-AddonConsoleActor.prototype.requestTypes = Object.create(WebConsoleActor.prototype.requestTypes);
-AddonConsoleActor.prototype.requestTypes.startListeners = AddonConsoleActor.prototype.onStartListeners;
-
 /**
  * Creates an actor for a network event.
  *
  * @constructor
  * @param object aChannel
  *        The nsIChannel associated with this event.
  * @param object aWebConsoleActor
  *        The parent WebConsoleActor instance for this object.
deleted file mode 100644
--- a/toolkit/devtools/tests/unit/test_consoleID.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const { console, ConsoleAPI } = Cu.import("resource://gre/modules/devtools/Console.jsm");
-
-const { require } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools;
-const { ConsoleAPIListener } = require("devtools/toolkit/webconsole/utils");
-
-var seenMessages = 0;
-var seenTypes = 0;
-
-var callback = {
-  onConsoleAPICall: function(aMessage) {
-    switch (aMessage.consoleID) {
-      case "foo":
-        do_check_eq(aMessage.level, "warn");
-        do_check_eq(aMessage.arguments[0], "Warning from foo");
-        seenTypes |= 1;
-        break;
-      case "bar":
-        do_check_eq(aMessage.level, "error");
-        do_check_eq(aMessage.arguments[0], "Error from bar");
-        seenTypes |= 2;
-        break;
-      default:
-        do_check_eq(aMessage.level, "log");
-        do_check_eq(aMessage.arguments[0], "Hello from default console");
-        seenTypes |= 4;
-        break;
-    }
-    seenMessages++;
-  }
-};
-
-/**
- * Tests that the consoleID property of the ConsoleAPI options gets passed
- * through to console messages.
- */
-function run_test() {
-  let console1 = new ConsoleAPI({
-    consoleID: "foo"
-  });
-  let console2 = new ConsoleAPI({
-    consoleID: "bar"
-  });
-
-  console.log("Hello from default console");
-  console1.warn("Warning from foo");
-  console2.error("Error from bar");
-
-  let listener = new ConsoleAPIListener(null, callback);
-  listener.init();
-  let messages = listener.getCachedMessages();
-
-  seenTypes = 0;
-  seenMessages = 0;
-  messages.forEach(callback.onConsoleAPICall);
-  do_check_eq(seenMessages, 3);
-  do_check_eq(seenTypes, 7);
-
-  seenTypes = 0;
-  seenMessages = 0;
-  console.log("Hello from default console");
-  console1.warn("Warning from foo");
-  console2.error("Error from bar");
-  do_check_eq(seenMessages, 3);
-  do_check_eq(seenTypes, 7);
-
-  listener.destroy();
-
-  listener = new ConsoleAPIListener(null, callback, "foo");
-  listener.init();
-  let messages = listener.getCachedMessages();
-
-  seenTypes = 0;
-  seenMessages = 0;
-  messages.forEach(callback.onConsoleAPICall);
-  do_check_eq(seenMessages, 2);
-  do_check_eq(seenTypes, 1);
-
-  seenTypes = 0;
-  seenMessages = 0;
-  console.log("Hello from default console");
-  console1.warn("Warning from foo");
-  console2.error("Error from bar");
-  do_check_eq(seenMessages, 1);
-  do_check_eq(seenTypes, 1);
-}
--- a/toolkit/devtools/tests/unit/xpcshell.ini
+++ b/toolkit/devtools/tests/unit/xpcshell.ini
@@ -2,10 +2,9 @@
 head = head_devtools.js
 tail =
 
 [test_independent_loaders.js]
 [test_invisible_loader.js]
 [test_safeErrorString.js]
 [test_defineLazyPrototypeGetter.js]
 [test_async-utils.js]
-[test_consoleID.js]
 [test_require_lazy.js]
\ No newline at end of file
--- a/toolkit/devtools/webconsole/utils.js
+++ b/toolkit/devtools/webconsole/utils.js
@@ -1286,24 +1286,21 @@ ConsoleServiceListener.prototype =
  * @param nsIDOMWindow aWindow
  *        Optional - the window object for which we are created. This is used
  *        for filtering out messages that belong to other windows.
  * @param object aOwner
  *        The owner object must have the following methods:
  *        - onConsoleAPICall(). This method is invoked with one argument, the
  *        Console API message that comes from the observer service, whenever
  *        a relevant console API call is received.
- * @param string aConsoleID
- *        Options - The consoleID that this listener should listen to
  */
-function ConsoleAPIListener(aWindow, aOwner, aConsoleID)
+function ConsoleAPIListener(aWindow, aOwner)
 {
   this.window = aWindow;
   this.owner = aOwner;
-  this.consoleID = aConsoleID;
   if (this.window) {
     this.layoutHelpers = new LayoutHelpers(this.window);
   }
 }
 exports.ConsoleAPIListener = ConsoleAPIListener;
 
 ConsoleAPIListener.prototype =
 {
@@ -1321,22 +1318,16 @@ ConsoleAPIListener.prototype =
    * console API call object that comes from the observer service.
    *
    * @type object
    * @see WebConsoleActor
    */
   owner: null,
 
   /**
-   * The consoleID that we listen for. If not null then only messages from this
-   * console will be returned.
-   */
-  consoleID: null,
-
-  /**
    * Initialize the window.console API observer.
    */
   init: function CAL_init()
   {
     // Note that the observer is process-wide. We will filter the messages as
     // needed, see CAL_observe().
     Services.obs.addObserver(this, "console-api-log-event", false);
   },
@@ -1359,19 +1350,16 @@ ConsoleAPIListener.prototype =
     let apiMessage = aMessage.wrappedJSObject;
     if (this.window) {
       let msgWindow = Services.wm.getCurrentInnerWindowWithId(apiMessage.innerID);
       if (!msgWindow || !this.layoutHelpers.isIncludedInTopLevelWindow(msgWindow)) {
         // Not the same window!
         return;
       }
     }
-    if (this.consoleID && apiMessage.consoleID != this.consoleID) {
-      return;
-    }
 
     this.owner.onConsoleAPICall(apiMessage);
   },
 
   /**
    * Get the cached messages for the current inner window and its (i)frames.
    *
    * @param boolean [aIncludePrivate=false]
@@ -1392,20 +1380,16 @@ ConsoleAPIListener.prototype =
       messages = ConsoleAPIStorage.getEvents();
     } else {
       let ids = WebConsoleUtils.getInnerWindowIDsForFrames(this.window);
       ids.forEach((id) => {
         messages = messages.concat(ConsoleAPIStorage.getEvents(id));
       });
     }
 
-    if (this.consoleID) {
-      messages = messages.filter((m) => m.consoleID == this.consoleID);
-    }
-
     if (aIncludePrivate) {
       return messages;
     }
 
     return messages.filter((m) => !m.private);
   },
 
   /**
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -32,18 +32,16 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 XPCOMUtils.defineLazyModuleGetter(this, "Promise",
                                   "resource://gre/modules/Promise.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Task",
                                   "resource://gre/modules/Task.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "OS",
                                   "resource://gre/modules/osfile.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "BrowserToolboxProcess",
                                   "resource:///modules/devtools/ToolboxProcess.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "ConsoleAPI",
-                                  "resource://gre/modules/devtools/Console.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this,
                                    "ChromeRegistry",
                                    "@mozilla.org/chrome/chrome-registry;1",
                                    "nsIChromeRegistry");
 XPCOMUtils.defineLazyServiceGetter(this,
                                    "ResProtocolHandler",
                                    "@mozilla.org/network/protocol;1?name=resource",
@@ -4123,19 +4121,16 @@ this.XPIProvider = {
         this.bootstrapScopes[aId][name] = BOOTSTRAP_REASONS[name];
 
       // Add other stuff that extensions want.
       const features = [ "Worker", "ChromeWorker" ];
 
       for (let feature of features)
         this.bootstrapScopes[aId][feature] = gGlobalScope[feature];
 
-      // Define a console for the add-on
-      this.bootstrapScopes[aId]["console"] = new ConsoleAPI({ consoleID: "addon/" + aId });
-
       // As we don't want our caller to control the JS version used for the
       // bootstrap file, we run loadSubScript within the context of the
       // sandbox with the latest JS version set explicitly.
       this.bootstrapScopes[aId].__SCRIPT_URI_SPEC__ = uri;
       Components.utils.evalInSandbox(
         "Components.classes['@mozilla.org/moz/jssubscript-loader;1'] \
                    .createInstance(Components.interfaces.mozIJSSubScriptLoader) \
                    .loadSubScript(__SCRIPT_URI_SPEC__);", this.bootstrapScopes[aId], "ECMAv5");
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/addons/bootstrap_globals/bootstrap.js
+++ /dev/null
@@ -1,29 +0,0 @@
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-let seenGlobals = new Set();
-let scope = this;
-function checkGlobal(name, type) {
-  if (scope[name] && typeof(scope[name]) == type)
-    seenGlobals.add(name);
-}
-
-let wrapped = {};
-Services.obs.notifyObservers({ wrappedJSObject: wrapped }, "bootstrap-request-globals", null);
-for (let [name, type] of wrapped.expectedGlobals) {
-  checkGlobal(name, type);
-}
-
-function install(data, reason) {
-}
-
-function startup(data, reason) {
-  Services.obs.notifyObservers({
-    wrappedJSObject: seenGlobals
-  }, "bootstrap-seen-globals", null);
-}
-
-function shutdown(data, reason) {
-}
-
-function uninstall(data, reason) {
-}
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/addons/bootstrap_globals/install.rdf
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
-  <Description about="urn:mozilla:install-manifest">
-    <em:id>bootstrap_globals@tests.mozilla.org</em:id>
-    <em:version>1.0</em:version>
-    <em:bootstrap>true</em:bootstrap>
-
-    <!-- Front End MetaData -->
-    <em:name>Test Bootstrap Globals</em:name>
-
-    <em:targetApplication>
-      <Description>
-        <em:id>xpcshell@tests.mozilla.org</em:id>
-        <em:minVersion>1</em:minVersion>
-        <em:maxVersion>1</em:maxVersion>
-      </Description>
-    </em:targetApplication>
-
-  </Description>
-</RDF>
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bootstrap_globals.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-// This verifies that bootstrap.js has the expected globals defined
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1");
-
-const EXPECTED_GLOBALS = [
-  ["Worker", "function"],
-  ["ChromeWorker", "function"],
-  ["console", "object"]
-];
-
-function run_test() {
-  do_test_pending();
-  startupManager();
-  let sawGlobals = false;
-
-  Services.obs.addObserver(function(subject) {
-    subject.wrappedJSObject.expectedGlobals = EXPECTED_GLOBALS;
-  }, "bootstrap-request-globals", false);
-
-  Services.obs.addObserver(function({ wrappedJSObject: seenGlobals }) {
-    for (let [name,] of EXPECTED_GLOBALS)
-      do_check_true(seenGlobals.has(name));
-
-    sawGlobals = true;
-  }, "bootstrap-seen-globals", false);
-
-  installAllFiles([do_get_addon("bootstrap_globals")], function() {
-    do_check_true(sawGlobals);
-    shutdownManager();
-    do_test_finished();
-  });
-}
--- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini
+++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini
@@ -260,9 +260,8 @@ skip-if = os == "android"
 run-sequentially = Uses global XCurProcD dir.
 [test_upgrade_strictcompat.js]
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
 run-sequentially = Uses global XCurProcD dir.
 [test_overrideblocklist.js]
 run-sequentially = Uses global XCurProcD dir.
 [test_sourceURI.js]
-[test_bootstrap_globals.js]