Bug 1229923 - fix the debugger flashing a paused state on startup
authorJames Long <longster@gmail.com>
Thu, 03 Dec 2015 20:21:31 -0500
changeset 309663 a1440a731b1a7b16cb940a4f016b1fb7a726c87a
parent 309662 204bb8e3e0c2fa29f7c26c0a9eb62c622a1a919e
child 309664 aea828e2cdf767a358ebc6ea661dd3b9b4160321
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1229923
milestone45.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 1229923 - fix the debugger flashing a paused state on startup
devtools/client/debugger/debugger-controller.js
--- a/devtools/client/debugger/debugger-controller.js
+++ b/devtools/client/debugger/debugger-controller.js
@@ -318,17 +318,21 @@ var DebuggerController = {
         fetchEventListeners();
       }
     });
 
     this.Workers.connect();
     this.ThreadState.connect();
     this.StackFrames.connect();
 
-    this._onNavigate();
+    // Load all of the sources. Note that the server will actually
+    // emit individual `newSource` notifications, which trigger
+    // separate actions, so this won't do anything other than force
+    // the server to traverse sources.
+    this.dispatch(actions.loadSources());
   },
 
   /**
    * Disconnects the debugger client and removes event handlers as necessary.
    */
   disconnect: function() {
     // Return early if the client didn't even have a chance to instantiate.
     if (!this.client) {
@@ -373,21 +377,22 @@ var DebuggerController = {
     clearNamedTimeout("event-breakpoints-update");
     clearNamedTimeout("event-listeners-fetch");
   },
 
   _onNavigate: function() {
     this.ThreadState.handleTabNavigation();
     this.StackFrames.handleTabNavigation();
 
-    // Load all of the sources. Note that the server will actually
-    // emit individual `newSource` notifications, which trigger
-    // separate actions, so this won't do anything other than force
-    // the server to traverse sources.
-
+    // TODO(jwl): We shouldn't need this call. We're already getting
+    // `newSource` notifications because we're already connected, but
+    // I'm not sure of the order those come in with regards to the
+    // navigation event.  Tests look for this action and it needs to
+    // indicate everything is done loading, so we should figure out
+    // another way to indicate that.
     this.dispatch(actions.loadSources());
   },
 
   /**
    * Called when the debugged tab is closed.
    */
   _onTabDetached: function() {
     this.shutdownDebugger();