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

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') | 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 084be15806f59dc95afae1d4e1a39bad9149d118..7ab87ff72dbe519e639d757b17845de3ac0a6256 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -483,8 +483,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_ =
@@ -546,9 +544,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 = JSFunction::GetDebugName(fun);
JSObject::AddProperty(stack_frame, function_key_, fun_name, NONE);
}
@@ -579,7 +575,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698