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 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1030 return new ScopeMirror(UNDEFINED, this, index); | 1030 return new ScopeMirror(UNDEFINED, this, index); |
1031 } | 1031 } |
1032 }; | 1032 }; |
1033 | 1033 |
1034 | 1034 |
1035 FunctionMirror.prototype.toText = function() { | 1035 FunctionMirror.prototype.toText = function() { |
1036 return this.source(); | 1036 return this.source(); |
1037 }; | 1037 }; |
1038 | 1038 |
1039 | 1039 |
1040 FunctionMirror.prototype.contextDebugId = function() { | |
Yang
2016/03/29 11:52:17
Why do we not return a ContextMirror like ScriptMi
kozy
2016/03/29 17:45:15
Done.
| |
1041 if (this.resolved()) { | |
1042 return %FunctionGetContextDebugId(this.value_); | |
1043 } | |
1044 }; | |
1045 | |
1046 | |
1040 /** | 1047 /** |
1041 * Mirror object for unresolved functions. | 1048 * Mirror object for unresolved functions. |
1042 * @param {string} value The name for the unresolved function reflected by this | 1049 * @param {string} value The name for the unresolved function reflected by this |
1043 * mirror. | 1050 * mirror. |
1044 * @constructor | 1051 * @constructor |
1045 * @extends ObjectMirror | 1052 * @extends ObjectMirror |
1046 */ | 1053 */ |
1047 function UnresolvedFunctionMirror(value) { | 1054 function UnresolvedFunctionMirror(value) { |
1048 // Construct this using the ValueMirror as an unresolved function is not a | 1055 // Construct this using the ValueMirror as an unresolved function is not a |
1049 // real object but just a string. | 1056 // real object but just a string. |
(...skipping 1992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3042 // Functions needed by the debugger runtime. | 3049 // Functions needed by the debugger runtime. |
3043 utils.InstallFunctions(utils, DONT_ENUM, [ | 3050 utils.InstallFunctions(utils, DONT_ENUM, [ |
3044 "ClearMirrorCache", ClearMirrorCache | 3051 "ClearMirrorCache", ClearMirrorCache |
3045 ]); | 3052 ]); |
3046 | 3053 |
3047 // Export to debug.js | 3054 // Export to debug.js |
3048 utils.Export(function(to) { | 3055 utils.Export(function(to) { |
3049 to.MirrorType = MirrorType; | 3056 to.MirrorType = MirrorType; |
3050 }); | 3057 }); |
3051 }) | 3058 }) |
OLD | NEW |