Index: src/messages.js |
diff --git a/src/messages.js b/src/messages.js |
index f0e71d9578db50cdd27eb56e3ab9db3b4d3653aa..67a4e81e6056616400bd62cea35bfef844bbd283 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"; |
} |