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

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

Issue 2686063002: [debugger] add precise mode for code coverage. (Closed)
Patch Set: 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
Index: src/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index 8cfb2134dc3f361e87d00bff12cf4c3585fcf6d4..64285622ebaf14552b1de570e6bee069f5604d29 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -1931,5 +1931,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

Powered by Google App Engine
This is Rietveld 408576698