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

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

Issue 1375813002: [V8] Add name of function for function's closure scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
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 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after
2228 if (opt_locals) { 2228 if (opt_locals) {
2229 result += '\n'; 2229 result += '\n';
2230 result += this.localsText(); 2230 result += this.localsText();
2231 } 2231 }
2232 return result; 2232 return result;
2233 }; 2233 };
2234 2234
2235 2235
2236 var kScopeDetailsTypeIndex = 0; 2236 var kScopeDetailsTypeIndex = 0;
2237 var kScopeDetailsObjectIndex = 1; 2237 var kScopeDetailsObjectIndex = 1;
2238 var kScopeDetailsNameIndex = 2;
Yang 2015/09/30 10:55:04 Please add a comment here that these indices corre
kozy 2015/09/30 17:00:18 Done.
2238 2239
2239 function ScopeDetails(frame, fun, index, opt_details) { 2240 function ScopeDetails(frame, fun, index, opt_details) {
2240 if (frame) { 2241 if (frame) {
2241 this.break_id_ = frame.break_id_; 2242 this.break_id_ = frame.break_id_;
2242 this.details_ = opt_details || 2243 this.details_ = opt_details ||
2243 %GetScopeDetails(frame.break_id_, 2244 %GetScopeDetails(frame.break_id_,
2244 frame.details_.frameId(), 2245 frame.details_.frameId(),
2245 frame.details_.inlinedFrameIndex(), 2246 frame.details_.inlinedFrameIndex(),
2246 index); 2247 index);
2247 this.frame_id_ = frame.details_.frameId(); 2248 this.frame_id_ = frame.details_.frameId();
(...skipping 16 matching lines...) Expand all
2264 2265
2265 2266
2266 ScopeDetails.prototype.object = function() { 2267 ScopeDetails.prototype.object = function() {
2267 if (!IS_UNDEFINED(this.break_id_)) { 2268 if (!IS_UNDEFINED(this.break_id_)) {
2268 %CheckExecutionState(this.break_id_); 2269 %CheckExecutionState(this.break_id_);
2269 } 2270 }
2270 return this.details_[kScopeDetailsObjectIndex]; 2271 return this.details_[kScopeDetailsObjectIndex];
2271 }; 2272 };
2272 2273
2273 2274
2275 ScopeDetails.prototype.name = function() {
2276 if (!IS_UNDEFINED(this.break_id_)) {
2277 %CheckExecutionState(this.break_id_);
2278 }
2279 return this.details_[kScopeDetailsNameIndex];
2280 };
2281
2282
2274 ScopeDetails.prototype.setVariableValueImpl = function(name, new_value) { 2283 ScopeDetails.prototype.setVariableValueImpl = function(name, new_value) {
2275 var raw_res; 2284 var raw_res;
2276 if (!IS_UNDEFINED(this.break_id_)) { 2285 if (!IS_UNDEFINED(this.break_id_)) {
2277 %CheckExecutionState(this.break_id_); 2286 %CheckExecutionState(this.break_id_);
2278 raw_res = %SetScopeVariableValue(this.break_id_, this.frame_id_, 2287 raw_res = %SetScopeVariableValue(this.break_id_, this.frame_id_,
2279 this.inlined_frame_id_, this.index_, name, new_value); 2288 this.inlined_frame_id_, this.index_, name, new_value);
2280 } else { 2289 } else {
2281 raw_res = %SetScopeVariableValue(this.fun_value_, null, null, this.index_, 2290 raw_res = %SetScopeVariableValue(this.fun_value_, null, null, this.index_,
2282 name, new_value); 2291 name, new_value);
2283 } 2292 }
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
3104 // Functions needed by the debugger runtime. 3113 // Functions needed by the debugger runtime.
3105 utils.InstallFunctions(utils, DONT_ENUM, [ 3114 utils.InstallFunctions(utils, DONT_ENUM, [
3106 "ClearMirrorCache", ClearMirrorCache 3115 "ClearMirrorCache", ClearMirrorCache
3107 ]); 3116 ]);
3108 3117
3109 // Export to debug.js 3118 // Export to debug.js
3110 utils.Export(function(to) { 3119 utils.Export(function(to) {
3111 to.MirrorType = MirrorType; 3120 to.MirrorType = MirrorType;
3112 }); 3121 });
3113 }) 3122 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698