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

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

Issue 2503403005: [wasm] Remove two obsolete functions (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | src/wasm/wasm-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index 81ab4fa2571404a665e4f7067101bc33ad58ecd7..fea8d834e1af57b6f6295a3f44a9cc74cd941948 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -551,10 +551,11 @@ RUNTIME_FUNCTION(Runtime_GetFrameDetails) {
details->set(kFrameDetailsFrameIdIndex, *frame_id);
// Add the function name.
- Handle<Object> wasm_instance(it.wasm_frame()->wasm_instance(), isolate);
+ Handle<Object> wasm_instance_or_undef(it.wasm_frame()->wasm_instance(),
+ isolate);
int func_index = it.wasm_frame()->function_index();
Handle<String> func_name =
- wasm::GetWasmFunctionName(isolate, wasm_instance, func_index);
+ wasm::GetWasmFunctionName(isolate, wasm_instance_or_undef, func_index);
details->set(kFrameDetailsFunctionIndex, *func_name);
// Add the script wrapper
@@ -573,11 +574,14 @@ RUNTIME_FUNCTION(Runtime_GetFrameDetails) {
// position, such that together with the script it uniquely identifies the
// position.
Handle<Object> positionValue;
- if (position != kNoSourcePosition) {
+ if (position != kNoSourcePosition &&
+ !wasm_instance_or_undef->IsUndefined(isolate)) {
int translated_position = position;
- if (!wasm::WasmIsAsmJs(*wasm_instance, isolate)) {
+ if (!wasm::WasmIsAsmJs(*wasm_instance_or_undef, isolate)) {
Handle<WasmCompiledModule> compiled_module(
- wasm::GetCompiledModule(JSObject::cast(*wasm_instance)), isolate);
+ WasmInstanceObject::cast(*wasm_instance_or_undef)
+ ->get_compiled_module(),
+ isolate);
translated_position +=
wasm::GetFunctionCodeOffset(compiled_module, func_index);
}
« no previous file with comments | « no previous file | src/wasm/wasm-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698