Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1001)

Unified Diff: src/debug/debug-evaluate.cc

Issue 2069823003: [wasm] Enable wasm frame inspection for debugging (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@split-wasm-debug
Patch Set: Add two DCHECKs Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug/debug.cc ('k') | src/debug/debug-frames.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug-evaluate.cc
diff --git a/src/debug/debug-evaluate.cc b/src/debug/debug-evaluate.cc
index 62b7a2b4269bf79104633d0e0a552c8ac4f98bc7..ab1e8d93dc202d5cc6f62f67cae8e7010c89d626 100644
--- a/src/debug/debug-evaluate.cc
+++ b/src/debug/debug-evaluate.cc
@@ -54,8 +54,9 @@ MaybeHandle<Object> DebugEvaluate::Local(Isolate* isolate,
DisableBreak disable_break_scope(isolate->debug(), disable_break);
// Get the frame where the debugging is performed.
- JavaScriptFrameIterator it(isolate, frame_id);
- JavaScriptFrame* frame = it.frame();
+ StackTraceFrameIterator it(isolate, frame_id);
+ if (!it.is_javascript()) return isolate->factory()->undefined_value();
+ JavaScriptFrame* frame = it.javascript_frame();
// Traverse the saved contexts chain to find the active context for the
// selected frame.
@@ -126,8 +127,7 @@ DebugEvaluate::ContextBuilder::ContextBuilder(Isolate* isolate,
frame_(frame),
inlined_jsframe_index_(inlined_jsframe_index) {
FrameInspector frame_inspector(frame, inlined_jsframe_index, isolate);
- Handle<JSFunction> local_function =
- Handle<JSFunction>::cast(frame_inspector.GetFunction());
+ Handle<JSFunction> local_function = frame_inspector.GetFunction();
Handle<Context> outer_context(local_function->context());
evaluation_context_ = outer_context;
outer_info_ = handle(local_function->shared());
« no previous file with comments | « src/debug/debug.cc ('k') | src/debug/debug-frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698