[WebAssembly] Inspector's DebuggerCallFrame should be aware of Wasm frames
https://bugs.webkit.org/show_bug.cgi?id=203925
Reviewed by Mark Lam.
The DebuggerCallFrame checks for CallFrame::codeBlock to determine if it the current frame is a
valid JS frame, but since the Wasm interpreter stores the Wasm::FunctionCodeBlock to this slot,
that check is not sufficient. Add an extra check for CalleeBits::isWasm.
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::sourceIDForCallFrame):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@252216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp b/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp
index 015d19e..3258faa 100644
--- a/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp
+++ b/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp
@@ -320,7 +320,7 @@
if (!callFrame)
return noSourceID;
CodeBlock* codeBlock = callFrame->codeBlock();
- if (!codeBlock)
+ if (!codeBlock || callFrame->callee().isWasm())
return noSourceID;
return codeBlock->ownerExecutable()->sourceID();
}