Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(537)

Side by Side Diff: src/debug/mirrors.js

Issue 2366863002: Mirror API for IsAsyncFunction (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/runtime/runtime.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 })
OLDNEW
« no previous file with comments | « no previous file | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698