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

Unified Diff: src/debug/debug.cc

Issue 2882973002: [coverage] Block coverage with support for IfStatements (Closed)
Patch Set: Rebase Created 3 years, 7 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/debug/debug.cc
diff --git a/src/debug/debug.cc b/src/debug/debug.cc
index 2ba0a54d46c41e3f47c708fbef1a9b6daba56758..6f756daf48be5662435fde42ed1b25129579ce10 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -1618,6 +1618,19 @@ Handle<DebugInfo> Debug::GetOrCreateDebugInfo(
return debug_info;
}
+void Debug::InstallCoverageInfo(Handle<SharedFunctionInfo> shared,
+ Handle<CoverageInfo> coverage_info) {
+ DCHECK(FLAG_block_coverage);
+ DCHECK(!coverage_info.is_null());
+
+ Handle<DebugInfo> debug_info = GetOrCreateDebugInfo(shared);
+
+ DCHECK(!debug_info->HasCoverageInfo());
+
+ debug_info->set_flags(debug_info->flags() | DebugInfo::kHasCoverageInfo);
+ debug_info->set_coverage_info(*coverage_info);
+}
+
void Debug::FindDebugInfo(Handle<DebugInfo> debug_info,
DebugInfoListNode** prev, DebugInfoListNode** curr) {
HandleScope scope(isolate_);

Powered by Google App Engine
This is Rietveld 408576698