Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 483f07a9f241d1df59627af1c1d52c1d4cf19dc8..84bc171d2eddecdb0b5b01af969c10583f18534c 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -9549,20 +9549,8 @@ Local<String> CpuProfileNode::GetFunctionName() const { |
} |
} |
-debug::Coverage::FunctionData::FunctionData(i::CoverageFunction* function, |
- Local<debug::Script> script) |
- : function_(function) { |
- i::Handle<i::Script> i_script = v8::Utils::OpenHandle(*script); |
- i::Script::PositionInfo start; |
- i::Script::PositionInfo end; |
- i::Script::GetPositionInfo(i_script, function->start, &start, |
- i::Script::WITH_OFFSET); |
- i::Script::GetPositionInfo(i_script, function->end, &end, |
- i::Script::WITH_OFFSET); |
- start_ = Location(start.line, start.column); |
- end_ = Location(end.line, end.column); |
-} |
- |
+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; } |
MaybeLocal<String> debug::Coverage::FunctionData::Name() { |
@@ -9579,7 +9567,7 @@ size_t debug::Coverage::ScriptData::FunctionCount() { |
debug::Coverage::FunctionData debug::Coverage::ScriptData::GetFunctionData( |
size_t i) { |
- return FunctionData(&script_->functions.at(i), GetScript()); |
+ return FunctionData(&script_->functions.at(i)); |
} |
debug::Coverage::~Coverage() { delete coverage_; } |