Bug 946641 - Part 2: Revert in Debugger frontend to balance event suppression/unsuppression. (r=past)
authorShu-yu Guo <shu@rfrn.org>
Fri, 06 Dec 2013 19:31:09 -0800
changeset 175020 b7186d67c952d89ec6dab2d0adebab1dadafd340
parent 175019 80db40e98167f83a126c93b7550680f28094da56
child 175021 5ca175317475a2cd77458120498cc49cbc58a0f4
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspast
bugs946641
milestone28.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 946641 - Part 2: Revert in Debugger frontend to balance event suppression/unsuppression. (r=past)
browser/devtools/debugger/test/browser.ini
toolkit/devtools/server/actors/webbrowser.js
--- a/browser/devtools/debugger/test/browser.ini
+++ b/browser/devtools/debugger/test/browser.ini
@@ -80,18 +80,16 @@ support-files =
 [browser_dbg_breakpoints-contextmenu.js]
 [browser_dbg_breakpoints-disabled-reload.js]
 [browser_dbg_breakpoints-editor.js]
 [browser_dbg_breakpoints-highlight.js]
 [browser_dbg_breakpoints-new-script.js]
 [browser_dbg_breakpoints-pane.js]
 [browser_dbg_chrome-debugging.js]
 [browser_dbg_clean-exit-window.js]
-# Disabled because of leaks - See Bug 933950.
-skip-if = true
 [browser_dbg_clean-exit.js]
 [browser_dbg_closure-inspection.js]
 [browser_dbg_cmd-blackbox.js]
 [browser_dbg_cmd-break.js]
 [browser_dbg_cmd-dbg.js]
 [browser_dbg_conditional-breakpoints-01.js]
 [browser_dbg_conditional-breakpoints-02.js]
 [browser_dbg_controller-evaluate-01.js]
--- a/toolkit/devtools/server/actors/webbrowser.js
+++ b/toolkit/devtools/server/actors/webbrowser.js
@@ -476,19 +476,16 @@ function BrowserTabActor(aConnection, aB
   this.conn = aConnection;
   this._browser = aBrowser;
   this._tabbrowser = aTabBrowser;
   this._tabActorPool = null;
   // A map of actor names to actor instances provided by extensions.
   this._extraActors = {};
 
   this._onWindowCreated = this.onWindowCreated.bind(this);
-
-  // Number of event loops nested.
-  this._nestedEventLoopDepth = 0;
 }
 
 // XXX (bug 710213): BrowserTabActor attach/detach/exit/disconnect is a
 // *complete* mess, needs to be rethought asap.
 
 BrowserTabActor.prototype = {
   get browser() { return this._browser; },
 
@@ -610,19 +607,16 @@ BrowserTabActor.prototype = {
     }
 
     if (this.attached) {
       this._detach();
       this.conn.send({ from: this.actorID,
                        type: "tabDetached" });
     }
 
-    // Pop all nested event loops if we haven't already.
-    while (this._nestedEventLoopDepth > 0)
-      this.postNest();
     this._browser = null;
     this._tabbrowser = null;
   },
 
   /* Support for DebuggerServer.addTabActor. */
   _createExtraActors: CommonCreateExtraActors,
   _appendExtraActors: CommonAppendExtraActors,
 
@@ -761,43 +755,35 @@ BrowserTabActor.prototype = {
       // The tab is already closed.
       return;
     }
     let windowUtils = this.window
                           .QueryInterface(Ci.nsIInterfaceRequestor)
                           .getInterface(Ci.nsIDOMWindowUtils);
     windowUtils.suppressEventHandling(true);
     windowUtils.suspendTimeouts();
-    this._nestedEventLoopDepth++;
   },
 
   /**
    * Prepare to exit a nested event loop by enabling debuggee events.
    */
   postNest: function BTA_postNest(aNestData) {
     if (!this.window) {
-      // The tab is already closed, so there is no way to resume events and
-      // timeouts.
-      // TODO: this wouldn't be necessary if closing a browser window could be
-      // identified early enough while this.window is still available. This is
-      // still cauisng leaks that we need to fix (bug 933950).
-      this._nestedEventLoopDepth--;
-      this._pendingNavigation = null;
+      // 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;
     }
-    this._nestedEventLoopDepth--;
   },
 
   /**
    * Handle location changes, by clearing the previous debuggees and enabling
    * debugging, which may have been disabled temporarily by the
    * DebuggerProgressListener.
    */
   onWindowCreated: