Index: src/runtime/runtime-debug.cc |
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc |
index d24a450cbfaa0d18a2a19377d20f244feb2a4f94..8d1e92d1e0721b4a8e1005a84bb4e8b7bdb158d2 100644 |
--- a/src/runtime/runtime-debug.cc |
+++ b/src/runtime/runtime-debug.cc |
@@ -751,8 +751,10 @@ RUNTIME_FUNCTION(Runtime_GetScopeCount) { |
// Get the frame where the debugging is performed. |
StackFrame::Id id = DebugFrameHelper::UnwrapFrameId(wrapped_id); |
- JavaScriptFrameIterator it(isolate, id); |
- JavaScriptFrame* frame = it.frame(); |
+ StackTraceFrameIterator it(isolate, id); |
+ StandardFrame* frame = it.frame(); |
+ if (it.frame()->is_wasm()) return 0; |
+ |
FrameInspector frame_inspector(frame, 0, isolate); |
// Count the visible scopes. |
@@ -786,8 +788,9 @@ RUNTIME_FUNCTION(Runtime_GetScopeDetails) { |
// Get the frame where the debugging is performed. |
StackFrame::Id id = DebugFrameHelper::UnwrapFrameId(wrapped_id); |
- JavaScriptFrameIterator frame_it(isolate, id); |
- JavaScriptFrame* frame = frame_it.frame(); |
+ StackTraceFrameIterator frame_it(isolate, id); |
+ // Wasm has no scopes, this must be javascript. |
+ JavaScriptFrame* frame = JavaScriptFrame::cast(frame_it.frame()); |
FrameInspector frame_inspector(frame, inlined_jsframe_index, isolate); |
// Find the requested scope. |
@@ -975,8 +978,9 @@ RUNTIME_FUNCTION(Runtime_SetScopeVariableValue) { |
// Get the frame where the debugging is performed. |
StackFrame::Id id = DebugFrameHelper::UnwrapFrameId(wrapped_id); |
- JavaScriptFrameIterator frame_it(isolate, id); |
- JavaScriptFrame* frame = frame_it.frame(); |
+ StackTraceFrameIterator frame_it(isolate, id); |
+ // Wasm has no scopes, this must be javascript. |
+ JavaScriptFrame* frame = JavaScriptFrame::cast(frame_it.frame()); |
FrameInspector frame_inspector(frame, inlined_jsframe_index, isolate); |
ScopeIterator it(isolate, &frame_inspector); |