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

Unified Diff: src/messages.js

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/isolate.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.js
diff --git a/src/messages.js b/src/messages.js
index 62429cfd2fd57252f1ebaab04043dcf32b5550c1..83526e65d3c813c714396f7f28853226aed132bd 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -833,16 +833,13 @@ function CallSiteGetFunction() {
function CallSiteGetFunctionName() {
// See if the function knows its own name
- var name = GET_PRIVATE(this, CallSiteFunctionKey).name;
- if (name) {
- return name;
- }
- name = %FunctionGetInferredName(GET_PRIVATE(this, CallSiteFunctionKey));
+ var fun = GET_PRIVATE(this, CallSiteFunctionKey);
+ var name = %FunctionGetDebugName(fun);
if (name) {
return name;
}
// Maybe this is an evaluation?
- var script = %FunctionGetScript(GET_PRIVATE(this, CallSiteFunctionKey));
+ var script = %FunctionGetScript(fun);
if (script && script.compilation_type == COMPILATION_TYPE_EVAL) {
return "eval";
}
« no previous file with comments | « src/isolate.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698