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

Unified Diff: src/api.cc

Issue 2766573003: [debug] introduce precise binary code coverage. (Closed)
Patch Set: fix test 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 | « no previous file | src/d8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index da883bb4ef9916cfcc3a6b18ef7372376a0d274b..3737da3aff2ac486b205dd0705b32cee3d26e2ec 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -9611,38 +9611,47 @@ Local<String> CpuProfileNode::GetFunctionName() const {
}
}
-int debug::Coverage::FunctionData::StartOffset() { return function_->start; }
-int debug::Coverage::FunctionData::EndOffset() { return function_->end; }
-uint32_t debug::Coverage::FunctionData::Count() { return function_->count; }
+int debug::Coverage::FunctionData::StartOffset() const {
+ return function_->start;
+}
+int debug::Coverage::FunctionData::EndOffset() const { return function_->end; }
+uint32_t debug::Coverage::FunctionData::Count() const {
+ return function_->count;
+}
-MaybeLocal<String> debug::Coverage::FunctionData::Name() {
+MaybeLocal<String> debug::Coverage::FunctionData::Name() const {
return ToApiHandle<String>(function_->name);
}
-Local<debug::Script> debug::Coverage::ScriptData::GetScript() {
+Local<debug::Script> debug::Coverage::ScriptData::GetScript() const {
return ToApiHandle<debug::Script>(script_->script);
}
-size_t debug::Coverage::ScriptData::FunctionCount() {
+size_t debug::Coverage::ScriptData::FunctionCount() const {
return script_->functions.size();
}
debug::Coverage::FunctionData debug::Coverage::ScriptData::GetFunctionData(
- size_t i) {
+ size_t i) const {
return FunctionData(&script_->functions.at(i));
}
debug::Coverage::~Coverage() { delete coverage_; }
-size_t debug::Coverage::ScriptCount() { return coverage_->size(); }
+size_t debug::Coverage::ScriptCount() const { return coverage_->size(); }
-debug::Coverage::ScriptData debug::Coverage::GetScriptData(size_t i) {
+debug::Coverage::ScriptData debug::Coverage::GetScriptData(size_t i) const {
return ScriptData(&coverage_->at(i));
}
-debug::Coverage debug::Coverage::Collect(Isolate* isolate, bool reset_count) {
- return Coverage(i::Coverage::Collect(reinterpret_cast<i::Isolate*>(isolate),
- reset_count));
+debug::Coverage debug::Coverage::CollectPrecise(Isolate* isolate) {
+ return Coverage(
+ i::Coverage::CollectPrecise(reinterpret_cast<i::Isolate*>(isolate)));
+}
+
+debug::Coverage debug::Coverage::CollectBestEffort(Isolate* isolate) {
+ return Coverage(
+ i::Coverage::CollectBestEffort(reinterpret_cast<i::Isolate*>(isolate)));
}
void debug::Coverage::SelectMode(Isolate* isolate, debug::Coverage::Mode mode) {
« no previous file with comments | « no previous file | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698