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

Unified Diff: src/feedback-vector.cc

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/debug/debug-interface.h ('k') | src/inspector/v8-profiler-agent-impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/feedback-vector.cc
diff --git a/src/feedback-vector.cc b/src/feedback-vector.cc
index 4bdf4823ce9395e825c1b3c69106d40b78fa67ee..d1e1f59ae3c2205d96c700d3cea45ef9ae98f68b 100644
--- a/src/feedback-vector.cc
+++ b/src/feedback-vector.cc
@@ -250,7 +250,9 @@ Handle<FeedbackVector> FeedbackVector::New(Isolate* isolate,
}
Handle<FeedbackVector> result = Handle<FeedbackVector>::cast(array);
- if (isolate->IsCodeCoverageEnabled()) AddToCodeCoverageList(isolate, result);
+ if (!isolate->is_best_effort_code_coverage()) {
+ AddToCodeCoverageList(isolate, result);
+ }
return result;
}
@@ -260,14 +262,16 @@ Handle<FeedbackVector> FeedbackVector::Copy(Isolate* isolate,
Handle<FeedbackVector> result;
result = Handle<FeedbackVector>::cast(
isolate->factory()->CopyFixedArray(Handle<FixedArray>::cast(vector)));
- if (isolate->IsCodeCoverageEnabled()) AddToCodeCoverageList(isolate, result);
+ if (!isolate->is_best_effort_code_coverage()) {
+ AddToCodeCoverageList(isolate, result);
+ }
return result;
}
// static
void FeedbackVector::AddToCodeCoverageList(Isolate* isolate,
Handle<FeedbackVector> vector) {
- DCHECK(isolate->IsCodeCoverageEnabled());
+ DCHECK(!isolate->is_best_effort_code_coverage());
if (!vector->shared_function_info()->IsSubjectToDebugging()) return;
Handle<ArrayList> list =
Handle<ArrayList>::cast(isolate->factory()->code_coverage_list());
« no previous file with comments | « src/debug/debug-interface.h ('k') | src/inspector/v8-profiler-agent-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698