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

Unified Diff: src/collection.js

Issue 293083005: Allow debugger to step into Map and Set forEach callbacks (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | « no previous file | test/mjsunit/harmony/debug-stepin-collections-foreach.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/collection.js
diff --git a/src/collection.js b/src/collection.js
index fefc7a0499db3c71ea1585ab2eb5a8767af755f9..cf70e06545912d3153ab15452c24e1d457c92d94 100644
--- a/src/collection.js
+++ b/src/collection.js
@@ -106,7 +106,9 @@ function SetForEach(f, receiver) {
var iterator = %SetCreateIterator(this, ITERATOR_KIND_VALUES);
var entry;
+ var stepping = %_DebugCallbackSupportsStepping(f);
while (!(entry = %SetIteratorNext(iterator)).done) {
+ if (stepping) %DebugPrepareStepInIfStepping(f);
%_CallFunction(receiver, entry.value, entry.value, this, f);
}
}
@@ -215,7 +217,9 @@ function MapForEach(f, receiver) {
var iterator = %MapCreateIterator(this, ITERATOR_KIND_ENTRIES);
var entry;
+ var stepping = %_DebugCallbackSupportsStepping(f);
while (!(entry = %MapIteratorNext(iterator)).done) {
+ if (stepping) %DebugPrepareStepInIfStepping(f);
%_CallFunction(receiver, entry.value[1], entry.value[0], this, f);
}
}
« no previous file with comments | « no previous file | test/mjsunit/harmony/debug-stepin-collections-foreach.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698