Bug 1299602 - Do not suspend navigation when navigating with a breakpoint. r=jlongster
MozReview-Commit-ID: L6WGZcL5eWL
--- 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,