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

Unified 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, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug/debug-scopes.cc ('k') | test/mjsunit/debug-scopes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/mirrors.js
diff --git a/src/debug/mirrors.js b/src/debug/mirrors.js
index 11f9e485c13be252986a228826de69c9ea83bf5c..7b27f5e270fbd1df6f03b53dd7d6d747a7d88ccf 100644
--- a/src/debug/mirrors.js
+++ b/src/debug/mirrors.js
@@ -2233,8 +2233,10 @@ FrameMirror.prototype.toText = function(opt_locals) {
};
+// This indexes correspond definitions in debug-scopes.h.
var kScopeDetailsTypeIndex = 0;
var kScopeDetailsObjectIndex = 1;
+var kScopeDetailsNameIndex = 2;
function ScopeDetails(frame, fun, index, opt_details) {
if (frame) {
@@ -2271,6 +2273,14 @@ ScopeDetails.prototype.object = function() {
};
+ScopeDetails.prototype.name = function() {
+ if (!IS_UNDEFINED(this.break_id_)) {
+ %CheckExecutionState(this.break_id_);
+ }
+ return this.details_[kScopeDetailsNameIndex];
+};
+
+
ScopeDetails.prototype.setVariableValueImpl = function(name, new_value) {
var raw_res;
if (!IS_UNDEFINED(this.break_id_)) {
« no previous file with comments | « src/debug/debug-scopes.cc ('k') | test/mjsunit/debug-scopes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698