1331064 - Assertion failure: throwing, at js/src/jscntxt.cpp:946 with wasm and Debugger

1331064 - Ignore wasm onExceptionUnwind events in JSTRAP_ERROR state.
This commit is contained in:
win7-7 2025-12-30 03:29:33 +02:00 committed by wuggy
commit f8d18b97b1

View file

@ -142,12 +142,16 @@ WasmHandleThrow()
DebugFrame* frame = iter.debugFrame();
JSTrapStatus status = Debugger::onExceptionUnwind(cx, frame);
if (status == JSTRAP_RETURN) {
// Unexpected trap return -- raising error since throw recovery
// is not yet implemented in the wasm baseline.
// TODO properly handle JSTRAP_RETURN and resume wasm execution.
JS_ReportErrorASCII(cx, "Unexpected resumption value from onExceptionUnwind");
// Assume JSTRAP_ERROR status if no exception is pending --
// no onExceptionUnwind handlers must be fired.
if (cx->isExceptionPending()) {
JSTrapStatus status = Debugger::onExceptionUnwind(cx, frame);
if (status == JSTRAP_RETURN) {
// Unexpected trap return -- raising error since throw recovery
// is not yet implemented in the wasm baseline.
// TODO properly handle JSTRAP_RETURN and resume wasm execution.
JS_ReportErrorASCII(cx, "Unexpected resumption value from onExceptionUnwind");
}
}
bool ok = Debugger::onLeaveFrame(cx, frame, nullptr, false);