mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-19 07:26:26 +00:00
Bug 1230556 - avoid blocking the debugger shutdown on pending requests r=me
This commit is contained in:
parent
eed11fe644
commit
7f3a465ddd
@ -239,8 +239,6 @@ var DebuggerController = {
|
||||
return;
|
||||
}
|
||||
|
||||
yield this._settleAllRequests();
|
||||
|
||||
DebuggerView.destroy();
|
||||
this.StackFrames.disconnect();
|
||||
this.ThreadState.disconnect();
|
||||
@ -253,24 +251,6 @@ var DebuggerController = {
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user