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

Unified Diff: src/objects.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 | « src/objects.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 76be0a6495e39c0fb56fbef6180565220ec9e00b..9587f8c7d0e95497efbaa0de9c602cfb75788b5f 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -10327,6 +10327,15 @@ bool JSFunction::PassesFilter(const char* raw_filter) {
}
+String* JSFunction::DebugName() {
Yang 2015/03/13 13:19:13 This is not GC-safe. GetDataProperty may cause GC,
kozy 2015/03/13 14:05:14 Done.
+ Handle<JSFunction> self(this);
+ Handle<Object> name =
+ JSObject::GetDataProperty(self, GetIsolate()->factory()->name_string());
+ if (name->IsString()) return String::cast(*name);
+ return shared()->DebugName();
+}
+
+
void Oddball::Initialize(Isolate* isolate,
Handle<Oddball> oddball,
const char* to_string,
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698