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

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

Issue 2686063002: [debugger] add precise mode for code coverage. (Closed)
Patch Set: fix flag Created 3 years, 10 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/runtime/runtime.h ('k') | test/mjsunit/code-coverage-precise.js » ('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 ab6fd30098ac2f58eadbe600b99629fe0a019efb..5aaa4251719d03f6e692ba5e6376c1291ff8f74b 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -1935,5 +1935,16 @@ RUNTIME_FUNCTION(Runtime_DebugCollectCoverage) {
return *factory->NewJSArrayWithElements(scripts_array, FAST_ELEMENTS);
}
+RUNTIME_FUNCTION(Runtime_DebugTogglePreciseCoverage) {
+ SealHandleScope shs(isolate);
+ CONVERT_BOOLEAN_ARG_CHECKED(enable, 0);
+ if (enable) {
+ Coverage::EnablePrecise(isolate);
+ } else {
+ Coverage::DisablePrecise(isolate);
+ }
+ return isolate->heap()->undefined_value();
+}
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/code-coverage-precise.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698