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 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1034 | 1034 |
1035 FunctionMirror.prototype.context = function() { | 1035 FunctionMirror.prototype.context = function() { |
1036 if (this.resolved()) { | 1036 if (this.resolved()) { |
1037 if (!this._context) | 1037 if (!this._context) |
1038 this._context = new ContextMirror(%FunctionGetContextData(this.value_)); | 1038 this._context = new ContextMirror(%FunctionGetContextData(this.value_)); |
1039 return this._context; | 1039 return this._context; |
1040 } | 1040 } |
1041 }; | 1041 }; |
1042 | 1042 |
1043 | 1043 |
| 1044 FunctionMirror.prototype.isAsyncFunction = function() { |
| 1045 return %FunctionIsAsyncFunction(this.value_); |
| 1046 } |
| 1047 |
| 1048 |
1044 /** | 1049 /** |
1045 * Mirror object for unresolved functions. | 1050 * Mirror object for unresolved functions. |
1046 * @param {string} value The name for the unresolved function reflected by this | 1051 * @param {string} value The name for the unresolved function reflected by this |
1047 * mirror. | 1052 * mirror. |
1048 * @constructor | 1053 * @constructor |
1049 * @extends ObjectMirror | 1054 * @extends ObjectMirror |
1050 */ | 1055 */ |
1051 function UnresolvedFunctionMirror(value) { | 1056 function UnresolvedFunctionMirror(value) { |
1052 // Construct this using the ValueMirror as an unresolved function is not a | 1057 // Construct this using the ValueMirror as an unresolved function is not a |
1053 // real object but just a string. | 1058 // real object but just a string. |
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3079 // Functions needed by the debugger runtime. | 3084 // Functions needed by the debugger runtime. |
3080 utils.InstallFunctions(utils, DONT_ENUM, [ | 3085 utils.InstallFunctions(utils, DONT_ENUM, [ |
3081 "ClearMirrorCache", ClearMirrorCache | 3086 "ClearMirrorCache", ClearMirrorCache |
3082 ]); | 3087 ]); |
3083 | 3088 |
3084 // Export to debug.js | 3089 // Export to debug.js |
3085 utils.Export(function(to) { | 3090 utils.Export(function(to) { |
3086 to.MirrorType = MirrorType; | 3091 to.MirrorType = MirrorType; |
3087 }); | 3092 }); |
3088 }) | 3093 }) |
OLD | NEW |