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

Unified Diff: src/isolate.cc

Issue 2057523002: [wasm] Refactor function name table and lookup (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix gc issue 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 | « no previous file | src/messages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index a2500c0a6d9e16dfb10ad75a866aea135854b7f3..7677dfcabc08ffbd3c0e7c0fe87392a5ce6b7015 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -605,16 +605,9 @@ class CaptureStackTraceHelper {
factory()->NewJSObject(isolate_->object_function());
if (!function_key_.is_null()) {
- Object* wasm_object = frame->wasm_obj();
- Handle<String> name;
- if (!wasm_object->IsUndefined(isolate_)) {
- Handle<JSObject> wasm = handle(JSObject::cast(wasm_object));
- wasm::GetWasmFunctionName(wasm, frame->function_index())
- .ToHandle(&name);
- }
- if (name.is_null()) {
- name = isolate_->factory()->NewStringFromStaticChars("<WASM UNNAMED>");
- }
+ Handle<String> name = wasm::GetWasmFunctionName(
+ isolate_, handle(frame->wasm_obj(), isolate_),
+ frame->function_index());
JSObject::AddProperty(stack_frame, function_key_, name, NONE);
}
// Encode the function index as line number.
« no previous file with comments | « no previous file | src/messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698