Index: src/inspector/v8-profiler-agent-impl.cc |
diff --git a/src/inspector/v8-profiler-agent-impl.cc b/src/inspector/v8-profiler-agent-impl.cc |
index c7d1cc26174bd07698943ed3290047a67695e3bd..5f5f815538169f061dbc45ef5fd08d15a94935c4 100644 |
--- a/src/inspector/v8-profiler-agent-impl.cc |
+++ b/src/inspector/v8-profiler-agent-impl.cc |
@@ -307,14 +307,19 @@ Response takeCoverage( |
ranges = protocol::Array<protocol::Profiler::CoverageRange>::create(); |
// At this point we only have per-function coverage data, so there is |
// only one range per function. |
- ranges->addItem( |
- protocol::Profiler::CoverageRange::create() |
- .setStartLineNumber(function_data.Start().GetLineNumber()) |
- .setStartColumnNumber(function_data.Start().GetColumnNumber()) |
- .setEndLineNumber(function_data.End().GetLineNumber()) |
- .setEndColumnNumber(function_data.End().GetColumnNumber()) |
- .setCount(function_data.Count()) |
- .build()); |
+ v8::debug::Location start = |
+ script->GetSourceLocation(function_data.StartOffset()); |
+ v8::debug::Location end = |
+ script->GetSourceLocation(function_data.EndOffset()); |
+ ranges->addItem(protocol::Profiler::CoverageRange::create() |
+ .setStartLineNumber(start.GetLineNumber()) |
+ .setStartColumnNumber(start.GetColumnNumber()) |
+ .setEndLineNumber(end.GetLineNumber()) |
+ .setEndColumnNumber(end.GetColumnNumber()) |
+ .setStartOffset(function_data.StartOffset()) |
+ .setEndOffset(function_data.EndOffset()) |
+ .setCount(function_data.Count()) |
+ .build()); |
functions->addItem( |
protocol::Profiler::FunctionCoverage::create() |
.setFunctionName(toProtocolString( |