Chromium Code Reviews| Index: src/messages.js |
| diff --git a/src/messages.js b/src/messages.js |
| index ba739987897417c7917901659d68f892cc8fe0ac..1f8ee652888c34c135d64fadacc6c95ed95f95ae 100644 |
| --- a/src/messages.js |
| +++ b/src/messages.js |
| @@ -832,16 +832,17 @@ function CallSiteGetFunction() { |
| function CallSiteGetFunctionName() { |
| // See if the function knows its own name |
| - var name = GET_PRIVATE(this, CallSiteFunctionKey).name; |
| - if (name) { |
| + var fun = GET_PRIVATE(this, CallSiteFunctionKey); |
| + var name = %GetDataProperty(fun, 'name'); |
| + if (IS_STRING(name)) { |
|
yurys
2015/03/06 11:11:26
Is it supposed to return in case of empty string?
kozy
2015/03/06 12:49:59
If user set empty function name then we show this
|
| return name; |
| } |
| - name = %FunctionGetInferredName(GET_PRIVATE(this, CallSiteFunctionKey)); |
| + 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"; |
| } |