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

Unified Diff: src/frames.cc

Issue 1970503004: [wasm] Differentiate unnamed and empty names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@add-utf8-check
Patch Set: Return null instead of undefined, and other cleanup Created 4 years, 7 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/frames.h ('k') | src/isolate.cc » ('j') | src/isolate.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index a8fe6bb7b61b2524c6f84313370ab665b234424e..e1fdb2a7180420eff2eb0f7e0e57ad20846bc703 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -1355,11 +1355,12 @@ uint32_t WasmFrame::function_index() {
return val;
}
-Object* WasmFrame::function_name() {
+String* WasmFrame::function_name() {
Object* wasm_object = wasm_obj();
- if (wasm_object->IsUndefined()) return wasm_object;
+ if (wasm_object->IsUndefined()) return nullptr;
Handle<JSObject> wasm = handle(JSObject::cast(wasm_object));
- return *wasm::GetWasmFunctionName(wasm, function_index());
+ MaybeHandle<String> name = wasm::GetWasmFunctionName(wasm, function_index());
+ return name.is_null() ? nullptr : *name.ToHandleChecked();
Yang 2016/05/18 13:38:48 This whole method seems to have only one user. Why
Clemens Hammacher 2016/05/18 17:44:06 Makes sense. Done.
}
namespace {
« no previous file with comments | « src/frames.h ('k') | src/isolate.cc » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698