Bug 1299602 - Do not suspend navigation when navigating with a breakpoint. r=jlongster
authorAlexandre Poirot <poirot.alex@gmail.com>
Thu, 01 Sep 2016 02:42:03 -0700
changeset 312361 42ada9dc0ab3c9e872f56201a0a1c4f7eb685acc
parent 312360 fd96f3fee9754562392a3877464b10aa90f82b71
child 312362 a4df9ee747c39bbb79a17ef999fc64eb5c2c19c2
push id20447
push userkwierso@gmail.com
push dateFri, 02 Sep 2016 20:36:44 +0000
treeherderfx-team@969397f22187 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlongster
bugs1299602
milestone51.0a1
Bug 1299602 - Do not suspend navigation when navigating with a breakpoint. r=jlongster MozReview-Commit-ID: L6WGZcL5eWL
devtools/server/actors/webbrowser.js
--- a/devtools/server/actors/webbrowser.js
+++ b/devtools/server/actors/webbrowser.js
@@ -916,18 +916,16 @@ TabActor.prototype = {
     return this._tabPool;
   },
 
   _contextPool: null,
   get contextActorPool() {
     return this._contextPool;
   },
 
-  _pendingNavigation: null,
-
   // A constant prefix that will be used to form the actor ID by the server.
   actorPrefix: "tab",
 
   /**
    * An object on which listen for DOMWindowCreated and pageshow events.
    */
   get chromeEventHandler() {
     return getDocShellChromeEventHandler(this.docShell);
@@ -1801,20 +1799,16 @@ TabActor.prototype = {
       // The tab is already closed.
       return;
     }
     let windowUtils = this.window
                           .QueryInterface(Ci.nsIInterfaceRequestor)
                           .getInterface(Ci.nsIDOMWindowUtils);
     windowUtils.resumeTimeouts();
     windowUtils.suppressEventHandling(false);
-    if (this._pendingNavigation) {
-      this._pendingNavigation.resume();
-      this._pendingNavigation = null;
-    }
   },
 
   _changeTopLevelDocument(window) {
     // Fake a will-navigate on the previous document
     // to let a chance to unregister it
     this._willNavigate(this.window, window.location.href, null, true);
 
     this._windowDestroyed(this.window, null, true);
@@ -1942,22 +1936,20 @@ TabActor.prototype = {
     if (!isTopLevel) {
       return;
     }
 
     // Proceed normally only if the debuggee is not paused.
     // TODO bug 997119: move that code to ThreadActor by listening to
     // will-navigate
     let threadActor = this.threadActor;
-    if (request && threadActor.state == "paused") {
-      request.suspend();
+    if (threadActor.state == "paused") {
       this.conn.send(
         threadActor.unsafeSynchronize(Promise.resolve(threadActor.onResume())));
       threadActor.dbg.enabled = false;
-      this._pendingNavigation = request;
     }
     threadActor.disableAllBreakpoints();
 
     this.conn.send({
       from: this.actorID,
       type: "tabNavigated",
       url: newURI,
       nativeConsoleAPI: true,