зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1596918: Part 1e - Correctly handle query handlers throwing uncatchable exceptions. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D53738 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d002626b06
Коммит
a05bf74656
|
@ -238,7 +238,13 @@ void JSWindowActor::ReceiveMessageOrQuery(
|
||||||
// If we have a promise, resolve or reject it respectively.
|
// If we have a promise, resolve or reject it respectively.
|
||||||
if (promise) {
|
if (promise) {
|
||||||
if (aRv.Failed()) {
|
if (aRv.Failed()) {
|
||||||
promise->MaybeReject(aRv);
|
if (aRv.IsUncatchableException()) {
|
||||||
|
aRv.SuppressException();
|
||||||
|
promise->MaybeRejectWithDOMException(
|
||||||
|
NS_ERROR_FAILURE, "Message handler threw uncatchable exception");
|
||||||
|
} else {
|
||||||
|
promise->MaybeReject(aRv);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
promise->MaybeResolve(retval);
|
promise->MaybeResolve(retval);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче