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"; |
} |