зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1221761 - Probe.prototype.release() now swallows NS_ERROR_NOT_AVAILABLE. r=felipe
During shutdown, we may find ourselves attempting to release and shutdown a probe while the PerformanceStats service is already shutdown. In this case, since the probe is already shutdown, we can simply ignore the error. --HG-- extra : transplant_source : %BBT%84%26.%AD%7B%23%1C%BC%3F%85%F9%18%A3%D8%84%EC%02%BE
This commit is contained in:
Родитель
01e2bd1f48
Коммит
17e41f6c46
|
@ -95,7 +95,15 @@ Probe.prototype = {
|
||||||
release: function() {
|
release: function() {
|
||||||
this._counter--;
|
this._counter--;
|
||||||
if (this._counter == 0) {
|
if (this._counter == 0) {
|
||||||
|
try {
|
||||||
this._impl.isActive = false;
|
this._impl.isActive = false;
|
||||||
|
} catch (ex) {
|
||||||
|
if (ex && typeof ex == "object" && ex.result == Components.results.NS_ERROR_NOT_AVAILABLE) {
|
||||||
|
// The service has already been shutdown. Ignore further shutdown requests.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
Process.broadcast("release", [this._name]);
|
Process.broadcast("release", [this._name]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Загрузка…
Ссылка в новой задаче