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

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

Issue 2766573003: [debug] introduce precise binary code coverage. (Closed)
Patch Set: fix test 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 | « src/objects-inl.h ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index 3eeb199204f62b4cb765fc2b4bf8462cf64cab7d..a13d3f95cccc6fb302552565831c01088d3a974a 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -1904,7 +1904,12 @@ RUNTIME_FUNCTION(Runtime_DebugCollectCoverage) {
HandleScope scope(isolate);
DCHECK_EQ(0, args.length());
// Collect coverage data.
- std::unique_ptr<Coverage> coverage(Coverage::Collect(isolate, false));
+ std::unique_ptr<Coverage> coverage;
+ if (isolate->is_best_effort_code_coverage()) {
+ coverage.reset(Coverage::CollectBestEffort(isolate));
+ } else {
+ coverage.reset(Coverage::CollectPrecise(isolate));
+ }
Factory* factory = isolate->factory();
// Turn the returned data structure into JavaScript.
// Create an array of scripts.
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698