mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1102549 - Make Debugger::slowPathPromiseHook handle various JSTrapStatus results. r=shu
This commit is contained in:
parent
54188fb057
commit
648a7399a9
5
js/src/jit-test/tests/debug/bug-1102549.js
Normal file
5
js/src/jit-test/tests/debug/bug-1102549.js
Normal file
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user