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

Unified Diff: src/isolate.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
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index d04839ce5cf21bd2b3a8d1cc4e4ac90c04296131..66b469237b14bf5f5c8d1c902a92c6a18f91ce74 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -616,10 +616,11 @@ class CaptureStackTraceHelper {
factory()->NewJSObject(isolate_->object_function());
if (!function_key_.is_null()) {
- Handle<Object> fun_name = handle(frame->function_name(), isolate_);
- if (fun_name->IsUndefined())
- fun_name = isolate_->factory()->InternalizeUtf8String(
- Vector<const char>("<WASM>"));
+ String* fun_name_raw = frame->function_name();
Yang 2016/05/18 13:38:48 Like noted previously, this having WasmFrame::func
+ Handle<String> fun_name =
+ fun_name_raw == nullptr
+ ? isolate_->factory()->NewStringFromStaticChars("<WASM UNNAMED>")
+ : handle(fun_name_raw, isolate_);
JSObject::AddProperty(stack_frame, function_key_, fun_name, NONE);
}
// Encode the function index as line number.

Powered by Google App Engine
This is Rietveld 408576698