| OLD | NEW |
| 1 // Copyright 2006-2012 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 (function(global, utils) { | 5 (function(global, utils) { |
| 6 "use strict"; | 6 "use strict"; |
| 7 | 7 |
| 8 // ---------------------------------------------------------------------------- | 8 // ---------------------------------------------------------------------------- |
| 9 // Imports | 9 // Imports |
| 10 | 10 |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 /** | 980 /** |
| 981 * Returns the name of the function. | 981 * Returns the name of the function. |
| 982 * @return {string} Name of the function | 982 * @return {string} Name of the function |
| 983 */ | 983 */ |
| 984 FunctionMirror.prototype.name = function() { | 984 FunctionMirror.prototype.name = function() { |
| 985 return %FunctionGetName(this.value_); | 985 return %FunctionGetName(this.value_); |
| 986 }; | 986 }; |
| 987 | 987 |
| 988 | 988 |
| 989 /** | 989 /** |
| 990 * Returns the displayName if it is set, otherwise name, otherwise inferred |
| 991 * name. |
| 992 * @return {string} Name of the function |
| 993 */ |
| 994 FunctionMirror.prototype.debugName = function() { |
| 995 return %FunctionGetDebugName(this.value_); |
| 996 } |
| 997 |
| 998 |
| 999 /** |
| 990 * Returns the inferred name of the function. | 1000 * Returns the inferred name of the function. |
| 991 * @return {string} Name of the function | 1001 * @return {string} Name of the function |
| 992 */ | 1002 */ |
| 993 FunctionMirror.prototype.inferredName = function() { | 1003 FunctionMirror.prototype.inferredName = function() { |
| 994 return %FunctionGetInferredName(this.value_); | 1004 return %FunctionGetInferredName(this.value_); |
| 995 }; | 1005 }; |
| 996 | 1006 |
| 997 | 1007 |
| 998 /** | 1008 /** |
| 999 * Returns the source code for the function. | 1009 * Returns the source code for the function. |
| (...skipping 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3122 // Functions needed by the debugger runtime. | 3132 // Functions needed by the debugger runtime. |
| 3123 utils.InstallFunctions(utils, DONT_ENUM, [ | 3133 utils.InstallFunctions(utils, DONT_ENUM, [ |
| 3124 "ClearMirrorCache", ClearMirrorCache | 3134 "ClearMirrorCache", ClearMirrorCache |
| 3125 ]); | 3135 ]); |
| 3126 | 3136 |
| 3127 // Export to debug.js | 3137 // Export to debug.js |
| 3128 utils.Export(function(to) { | 3138 utils.Export(function(to) { |
| 3129 to.MirrorType = MirrorType; | 3139 to.MirrorType = MirrorType; |
| 3130 }); | 3140 }); |
| 3131 }) | 3141 }) |
| OLD | NEW |