Bug 1566850 - Remove target.activeConsole usage in Toolbox. r=ochameau.
☠☠ backed out by 535b50b4c504 ☠ ☠
authorNicolas Chevobbe <nchevobbe@mozilla.com>
Fri, 13 Dec 2019 09:15:17 +0000
changeset 506851 b3aea303d3ed1feb424f3494b5954b6da293dab0
parent 506850 3c8ef35fde92e30a5e02ad58c9df47086f565349
child 506852 da1672f831d1643342bf1098723f0f8d750fd8a3
push id36913
push useropoprus@mozilla.com
push dateFri, 13 Dec 2019 16:53:24 +0000
treeherdermozilla-central@1ed684598bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1566850
milestone73.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 1566850 - Remove target.activeConsole usage in Toolbox. r=ochameau. Differential Revision: https://phabricator.services.mozilla.com/D56692
devtools/client/framework/toolbox.js
--- a/devtools/client/framework/toolbox.js
+++ b/devtools/client/framework/toolbox.js
@@ -662,20 +662,18 @@ Toolbox.prototype = {
    * resources. We do that by calling its `attach` method.
    * And we listen for thread actor events in order to update toolbox UI when
    * we hit a breakpoint.
    */
   async _attachTarget(target) {
     await target.attach();
 
     // Start tracking network activity on toolbox open for targets such as tabs.
-    // (Workers and potentially others don't manage the console client in the target.)
-    if (target.activeConsole) {
-      await target.activeConsole.startListeners(["NetworkActivity"]);
-    }
+    const webConsoleFront = await target.getFront("console");
+    await webConsoleFront.startListeners(["NetworkActivity"]);
 
     const threadFront = await this._attachAndResumeThread(target);
     this._startThreadFrontListeners(threadFront);
     return threadFront;
   },
 
   _startThreadFrontListeners: function(threadFront) {
     // threadFront listeners are removed when the thread is destroyed