Bug 1230556 - avoid blocking the debugger shutdown on pending requests r=me
authorJames Long <longster@gmail.com>
Sat, 05 Dec 2015 13:04:21 -0500
changeset 309816 2193658ea0c7bdb7ba0dffb3114796c32e212cf3
parent 309780 22d7d0b39c38a48fbb86c5c961404ae75403e4d4
child 309817 60eb5c874c64990bc04f5405550060dda2d2f235
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)
reviewersme
bugs1230556
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 1230556 - avoid blocking the debugger shutdown on pending requests r=me
devtools/client/debugger/debugger-controller.js
--- a/devtools/client/debugger/debugger-controller.js
+++ b/devtools/client/debugger/debugger-controller.js
@@ -234,48 +234,28 @@ var DebuggerController = {
    * @return object
    *         A promise that is resolved when the debugger finishes shutdown.
    */
   shutdownDebugger: Task.async(function*() {
     if (this._shutdown) {
       return;
     }
 
-    yield this._settleAllRequests();
-
     DebuggerView.destroy();
     this.StackFrames.disconnect();
     this.ThreadState.disconnect();
     if (this._target.isTabActor) {
       this.Workers.disconnect();
     }
 
     this.disconnect();
 
     this._shutdown = true;
   }),
 
-  _settleAllRequests: function() {
-    const requests = this.getState().asyncRequests;
-
-    if (requests.length > 0) {
-      const deferred = promise.defer();
-      this.onChange('open-requests', function checkSettled(reqs) {
-        if (reqs.length === 0) {
-          deferred.resolve();
-        }
-
-        this.offChange('open-requests', checkSettled);
-      }.bind(this));
-      return deferred.promise;
-    }
-
-    return promise.resolve();
-  },
-
   /**
    * Initiates remote debugging based on the current target, wiring event
    * handlers as necessary.
    *
    * @return object
    *         A promise that is resolved when the debugger finishes connecting.
    */
   connect: Task.async(function*() {