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

Unified Diff: src/isolate.h

Issue 2765813002: [debug] refactor code coverage to use enum for mode. (Closed)
Patch Set: fix d8 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/inspector/v8-profiler-agent-impl.cc ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index 0d6494604edb8956bb48ac014abf51a2d995fd2e..d272a77db5a269f3dddf91d87878980c3a564315 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -14,6 +14,7 @@
#include "src/builtins/builtins.h"
#include "src/contexts.h"
#include "src/date.h"
+#include "src/debug/debug-interface.h"
#include "src/execution.h"
#include "src/frames.h"
#include "src/futex-emulation.h"
@@ -422,6 +423,8 @@ typedef List<HeapObject*> DebugObjectCache;
V(bool, formatting_stack_trace, false) \
/* Perform side effect checks on function call and API callbacks. */ \
V(bool, needs_side_effect_check, false) \
+ /* Current code coverage mode */ \
+ V(debug::Coverage::Mode, code_coverage_mode, debug::Coverage::kBestEffort) \
ISOLATE_INIT_SIMULATOR_LIST(V)
#define THREAD_LOCAL_TOP_ACCESSOR(type, name) \
@@ -975,7 +978,14 @@ class Isolate {
bool NeedsSourcePositionsForProfiling() const;
- bool IsCodeCoverageEnabled();
+ bool is_best_effort_code_coverage() const {
+ return code_coverage_mode() == debug::Coverage::kBestEffort;
+ }
+
+ bool is_precise_count_code_coverage() const {
+ return code_coverage_mode() == debug::Coverage::kPreciseCount;
+ }
+
void SetCodeCoverageList(Object* value);
double time_millis_since_init() {
« no previous file with comments | « src/inspector/v8-profiler-agent-impl.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698