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

Unified Diff: src/debug/debug-coverage.cc

Issue 2794443002: [debug] fix coverage for non-default test variants. (Closed)
Patch Set: fix Created 3 years, 9 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/inspector/cpu-profiler/coverage.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug-coverage.cc
diff --git a/src/debug/debug-coverage.cc b/src/debug/debug-coverage.cc
index c30c017c7d66bc1488bfa7edc4904520959dc040..76f7b3fd5ac0ef155fffcf0213f4d0a5c68bf656 100644
--- a/src/debug/debug-coverage.cc
+++ b/src/debug/debug-coverage.cc
@@ -159,14 +159,15 @@ Coverage* Coverage::Collect(Isolate* isolate,
count = 1;
break;
}
- } else if (nesting.empty() || functions->at(nesting.back()).count == 0) {
- // Only include a function range if it has a non-0 count, or
- // if it is directly nested inside a function with non-0 count.
- continue;
}
- Handle<String> name(info->DebugName(), isolate);
- nesting.push_back(functions->size());
- functions->emplace_back(start, end, count, name);
+ // Only include a function range if it has a non-0 count, or
+ // if it is directly nested inside a function with non-0 count.
+ if (count != 0 ||
+ (!nesting.empty() && functions->at(nesting.back()).count != 0)) {
+ Handle<String> name(info->DebugName(), isolate);
+ nesting.push_back(functions->size());
+ functions->emplace_back(start, end, count, name);
+ }
}
// Remove entries for scripts that have no coverage.
« no previous file with comments | « no previous file | test/inspector/cpu-profiler/coverage.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698