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

Unified Diff: src/isolate.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/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index d54654f9c6f607c30b9d0b73718c0bf4e5e7ead8..f80cb3bf9519d97a5a97299c6fd9a675f7f52cf8 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -2901,10 +2901,9 @@ Map* Isolate::get_initial_js_array_map(ElementsKind kind) {
return nullptr;
}
-
-bool Isolate::use_crankshaft() const {
+bool Isolate::use_crankshaft() {
return FLAG_opt && FLAG_crankshaft && !serializer_enabled_ &&
- CpuFeatures::SupportsCrankshaft();
+ CpuFeatures::SupportsCrankshaft() && !IsCodeCoverageEnabled();
}
bool Isolate::NeedsSourcePositionsForProfiling() const {
@@ -2913,6 +2912,15 @@ bool Isolate::NeedsSourcePositionsForProfiling() const {
debug_->is_active() || logger_->is_logging();
}
+bool Isolate::IsCodeCoverageEnabled() {
jgruber 2017/02/09 16:08:48 Can we mark this const and keep constness above fo
Yang 2017/02/09 17:42:15 I don't think this is performance sensitive. And u
+ return heap()->code_coverage_list()->IsFixedArray();
jgruber 2017/02/09 16:08:48 IsArrayList may be better here and elsewhere for c
Yang 2017/02/09 17:42:15 Done.
+}
+
+void Isolate::SetCodeCoverageList(Object* value) {
+ DCHECK(value->IsUndefined(this) || value->IsFixedArray());
+ heap()->set_code_coverage_list(value);
+}
+
bool Isolate::IsArrayOrObjectPrototype(Object* object) {
Object* context = heap()->native_contexts_list();
while (!context->IsUndefined(this)) {

Powered by Google App Engine
This is Rietveld 408576698