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

Unified Diff: runtime/vm/coverage.cc

Issue 25790004: - Fix typos and add comments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/string_buffer_patch.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/coverage.cc
===================================================================
--- runtime/vm/coverage.cc (revision 28067)
+++ runtime/vm/coverage.cc (working copy)
@@ -75,6 +75,8 @@
jsobj.AddProperty("source", saved_url.ToCString());
JSONArray hits_arr(&jsobj, "hits");
+ // We stay within this loop while we are seeing functions from the same
+ // source URI.
while (i < functions.Length()) {
function ^= functions.At(i);
script = function.script();
@@ -87,10 +89,12 @@
}
}
- GrowableObjectArray& closures = GrowableObjectArray::Handle(
- cls.closures());
+ GrowableObjectArray& closures =
+ GrowableObjectArray::Handle(cls.closures());
if (!closures.IsNull()) {
i = 0;
+ // We need to keep rechecking the length of the closures array, as handling
+ // a closure potentially adds new entries to the end.
while (i < closures.Length()) {
HANDLESCOPE(isolate);
function ^= closures.At(i);
@@ -100,6 +104,8 @@
jsobj.AddProperty("source", saved_url.ToCString());
JSONArray hits_arr(&jsobj, "hits");
+ // We stay within this loop while we are seeing functions from the same
+ // source URI.
while (i < closures.Length()) {
function ^= closures.At(i);
script = function.script();
« no previous file with comments | « runtime/lib/string_buffer_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698