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

Unified Diff: src/mirror-debugger.js

Issue 710273002: Expose internal properties of map/set iterators via mirrors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 1 month 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 | « no previous file | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mirror-debugger.js
diff --git a/src/mirror-debugger.js b/src/mirror-debugger.js
index c8d2461d6bf46f30c608b836adba3a78f2ed191f..6cec64681f586c988792e9ddf4f61bbe1c414dda 100644
--- a/src/mirror-debugger.js
+++ b/src/mirror-debugger.js
@@ -919,6 +919,22 @@ ObjectMirror.GetInternalProperties = function(value) {
result.push(new InternalPropertyMirror("[[BoundArgs]]", boundArgs));
}
return result;
+ } else if (IS_MAP_ITERATOR(value) || IS_SET_ITERATOR(value)) {
+ var details = IS_MAP_ITERATOR(value) ? %MapIteratorDetails(value)
+ : %SetIteratorDetails(value);
+ var kind;
+ switch (details[2]) {
+ case 1: kind = "keys"; break;
+ case 2: kind = "values"; break;
+ case 3: kind = "entries"; break;
+ }
+ var result = [];
+ result.push(new InternalPropertyMirror("[[IteratorHasMore]]", details[0]));
+ result.push(new InternalPropertyMirror("[[IteratorIndex]]", details[1]));
+ if (kind) {
+ result.push(new InternalPropertyMirror("[[IteratorKind]]", kind));
+ }
+ return result;
} else if (ObjectIsPromise(value)) {
var result = [];
result.push(new InternalPropertyMirror("[[PromiseStatus]]",
« 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