зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1102549 - Make Debugger::slowPathPromiseHook handle various JSTrapStatus results. r=shu
This commit is contained in:
Родитель
b9657f03cb
Коммит
1bfe75470c
|
@ -0,0 +1,5 @@
|
|||
// |jit-test| error: log is not defined
|
||||
var g = newGlobal();
|
||||
var dbg = new Debugger(g);
|
||||
dbg.onPromiseSettled = function (g) { log += 's'; throw "foopy"; };
|
||||
g.settleFakePromise(g.makeFakePromise());
|
|
@ -1683,9 +1683,10 @@ Debugger::slowPathPromiseHook(JSContext *cx, Hook hook, HandleObject promise)
|
|||
{
|
||||
MOZ_ASSERT(hook == OnNewPromise || hook == OnPromiseSettled);
|
||||
RootedValue rval(cx);
|
||||
DebugOnly<JSTrapStatus> status = dispatchHook(cx, &rval, hook, promise);
|
||||
MOZ_ASSERT(status == JSTRAP_CONTINUE);
|
||||
MOZ_ASSERT(!cx->isExceptionPending());
|
||||
|
||||
// Promise hooks are infallible and we ignore errors from uncaught
|
||||
// exceptions by design.
|
||||
(void) dispatchHook(cx, &rval, hook, promise);
|
||||
}
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче