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

Unified Diff: src/isolate.cc

Issue 919653002: [V8] Use Function.name in Error.stack (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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.js » ('j') | src/objects.cc » ('J')
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 dc31fb68692c732ac7b3f322d7b12bcf94ad3ec5..c5f493d22c30768400854d86714216046a0774a6 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -489,8 +489,6 @@ class CaptureStackTraceHelper {
if (options & StackTrace::kFunctionName) {
function_key_ = factory()->InternalizeOneByteString(
STATIC_CHAR_VECTOR("functionName"));
- name_key_ =
- factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("name"));
}
if (options & StackTrace::kIsEval) {
eval_key_ =
@@ -552,9 +550,7 @@ class CaptureStackTraceHelper {
}
if (!function_key_.is_null()) {
- Handle<Object> fun_name = JSObject::GetDataProperty(fun, name_key_);
- if (!fun_name->IsString())
- fun_name = Handle<Object>(fun->shared()->DebugName(), isolate_);
+ Handle<Object> fun_name = Handle<Object>(fun->DebugName(), isolate_);
JSObject::AddProperty(stack_frame, function_key_, fun_name, NONE);
}
@@ -585,7 +581,6 @@ class CaptureStackTraceHelper {
Handle<String> function_key_;
Handle<String> eval_key_;
Handle<String> constructor_key_;
- Handle<String> name_key_;
};
« no previous file with comments | « no previous file | src/messages.js » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698