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

Unified Diff: src/wasm/wasm-objects.cc

Issue 2629823003: [wasm] Implement frame inspection for interpreted frames (Closed)
Patch Set: Rebase after Yangs revert ಠ益ಠ Created 3 years, 11 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/wasm/wasm-objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-objects.cc
diff --git a/src/wasm/wasm-objects.cc b/src/wasm/wasm-objects.cc
index f2b6b5e88dfef031fc31a7c869239e7a8160291e..1e6180ecfcf043a83479e75a6d0c505846559510 100644
--- a/src/wasm/wasm-objects.cc
+++ b/src/wasm/wasm-objects.cc
@@ -1133,6 +1133,27 @@ bool WasmCompiledModule::SetBreakPoint(
return true;
}
+MaybeHandle<FixedArray> WasmCompiledModule::CheckBreakPoints(int position) {
+ Isolate* isolate = GetIsolate();
+ if (!shared()->has_breakpoint_infos()) return {};
+
+ Handle<FixedArray> breakpoint_infos(shared()->breakpoint_infos(), isolate);
+ int insert_pos =
+ FindBreakpointInfoInsertPos(isolate, breakpoint_infos, position);
+ if (insert_pos >= breakpoint_infos->length()) return {};
+
+ Handle<Object> maybe_breakpoint_info(breakpoint_infos->get(insert_pos),
+ isolate);
+ if (maybe_breakpoint_info->IsUndefined(isolate)) return {};
+ Handle<BreakPointInfo> breakpoint_info =
+ Handle<BreakPointInfo>::cast(maybe_breakpoint_info);
+ if (breakpoint_info->source_position() != position) return {};
+
+ Handle<Object> breakpoint_objects(breakpoint_info->break_point_objects(),
+ isolate);
+ return isolate->debug()->GetHitBreakPointObjects(breakpoint_objects);
+}
+
Handle<WasmInstanceWrapper> WasmInstanceWrapper::New(
Isolate* isolate, Handle<WasmInstanceObject> instance) {
Handle<FixedArray> array =
« no previous file with comments | « src/wasm/wasm-objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698