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 |