Commit c8270759 authored by yangguo's avatar yangguo Committed by Commit bot

[inspector] do not translate offset to line/column for coverage.

R=caseq@chromium.org, pfeldman@chromium.org
BUG=v8:5808

Review-Url: https://codereview.chromium.org/2741653003
Cr-Commit-Position: refs/heads/master@{#43710}
parent 0444a962
...@@ -848,10 +848,6 @@ ...@@ -848,10 +848,6 @@
"type": "object", "type": "object",
"description": "Coverage data for a source range.", "description": "Coverage data for a source range.",
"properties": [ "properties": [
{ "name": "startLineNumber", "type": "integer", "description": "JavaScript script line number (0-based) for the range start." },
{ "name": "startColumnNumber", "type": "integer", "description": "JavaScript script column number (0-based) for the range start." },
{ "name": "endLineNumber", "type": "integer", "description": "JavaScript script line number (0-based) for the range end." },
{ "name": "endColumnNumber", "type": "integer", "description": "JavaScript script column number (0-based) for the range end." },
{ "name": "startOffset", "type": "integer", "description": "JavaScript script source offset for the range start." }, { "name": "startOffset", "type": "integer", "description": "JavaScript script source offset for the range start." },
{ "name": "endOffset", "type": "integer", "description": "JavaScript script source offset for the range end." }, { "name": "endOffset", "type": "integer", "description": "JavaScript script source offset for the range end." },
{ "name": "count", "type": "integer", "description": "Collected execution count of the source range." } { "name": "count", "type": "integer", "description": "Collected execution count of the source range." }
......
...@@ -307,15 +307,7 @@ Response takeCoverage( ...@@ -307,15 +307,7 @@ Response takeCoverage(
ranges = protocol::Array<protocol::Profiler::CoverageRange>::create(); ranges = protocol::Array<protocol::Profiler::CoverageRange>::create();
// At this point we only have per-function coverage data, so there is // At this point we only have per-function coverage data, so there is
// only one range per function. // only one range per function.
v8::debug::Location start =
script->GetSourceLocation(function_data.StartOffset());
v8::debug::Location end =
script->GetSourceLocation(function_data.EndOffset());
ranges->addItem(protocol::Profiler::CoverageRange::create() ranges->addItem(protocol::Profiler::CoverageRange::create()
.setStartLineNumber(start.GetLineNumber())
.setStartColumnNumber(start.GetColumnNumber())
.setEndLineNumber(end.GetLineNumber())
.setEndColumnNumber(end.GetColumnNumber())
.setStartOffset(function_data.StartOffset()) .setStartOffset(function_data.StartOffset())
.setEndOffset(function_data.EndOffset()) .setEndOffset(function_data.EndOffset())
.setCount(function_data.Count()) .setCount(function_data.Count())
......
...@@ -12,11 +12,7 @@ Running test: testPreciseBaseline ...@@ -12,11 +12,7 @@ Running test: testPreciseBaseline
ranges : [ ranges : [
[0] : { [0] : {
count : 0 count : 0
endColumnNumber : 1
endLineNumber : 4
endOffset : 73 endOffset : 73
startColumnNumber : 0
startLineNumber : 1
startOffset : 1 startOffset : 1
} }
] ]
...@@ -39,11 +35,7 @@ Running test: testPreciseBaseline ...@@ -39,11 +35,7 @@ Running test: testPreciseBaseline
ranges : [ ranges : [
[0] : { [0] : {
count : 0 count : 0
endColumnNumber : 1
endLineNumber : 4
endOffset : 73 endOffset : 73
startColumnNumber : 0
startLineNumber : 1
startOffset : 1 startOffset : 1
} }
] ]
...@@ -73,11 +65,7 @@ Running test: testPreciseCoverage ...@@ -73,11 +65,7 @@ Running test: testPreciseCoverage
ranges : [ ranges : [
[0] : { [0] : {
count : 1 count : 1
endColumnNumber : 0
endLineNumber : 9
endOffset : 119 endOffset : 119
startColumnNumber : 0
startLineNumber : 0
startOffset : 0 startOffset : 0
} }
] ]
...@@ -87,11 +75,7 @@ Running test: testPreciseCoverage ...@@ -87,11 +75,7 @@ Running test: testPreciseCoverage
ranges : [ ranges : [
[0] : { [0] : {
count : 15 count : 15
endColumnNumber : 1
endLineNumber : 4
endOffset : 73 endOffset : 73
startColumnNumber : 0
startLineNumber : 1
startOffset : 1 startOffset : 1
} }
] ]
...@@ -101,11 +85,7 @@ Running test: testPreciseCoverage ...@@ -101,11 +85,7 @@ Running test: testPreciseCoverage
ranges : [ ranges : [
[0] : { [0] : {
count : 1 count : 1
endColumnNumber : 1
endLineNumber : 7
endOffset : 106 endOffset : 106
startColumnNumber : 1
startLineNumber : 5
startOffset : 75 startOffset : 75
} }
] ]
...@@ -121,11 +101,7 @@ Running test: testPreciseCoverage ...@@ -121,11 +101,7 @@ Running test: testPreciseCoverage
ranges : [ ranges : [
[0] : { [0] : {
count : 1 count : 1
endColumnNumber : 11
endLineNumber : 0
endOffset : 11 endOffset : 11
startColumnNumber : 0
startLineNumber : 0
startOffset : 0 startOffset : 0
} }
] ]
...@@ -148,11 +124,7 @@ Running test: testPreciseCoverage ...@@ -148,11 +124,7 @@ Running test: testPreciseCoverage
ranges : [ ranges : [
[0] : { [0] : {
count : 0 count : 0
endColumnNumber : 0
endLineNumber : 9
endOffset : 119 endOffset : 119
startColumnNumber : 0
startLineNumber : 0
startOffset : 0 startOffset : 0
} }
] ]
...@@ -162,11 +134,7 @@ Running test: testPreciseCoverage ...@@ -162,11 +134,7 @@ Running test: testPreciseCoverage
ranges : [ ranges : [
[0] : { [0] : {
count : 0 count : 0
endColumnNumber : 1
endLineNumber : 4
endOffset : 73 endOffset : 73
startColumnNumber : 0
startLineNumber : 1
startOffset : 1 startOffset : 1
} }
] ]
...@@ -176,11 +144,7 @@ Running test: testPreciseCoverage ...@@ -176,11 +144,7 @@ Running test: testPreciseCoverage
ranges : [ ranges : [
[0] : { [0] : {
count : 0 count : 0
endColumnNumber : 1
endLineNumber : 7
endOffset : 106 endOffset : 106
startColumnNumber : 1
startLineNumber : 5
startOffset : 75 startOffset : 75
} }
] ]
...@@ -196,11 +160,7 @@ Running test: testPreciseCoverage ...@@ -196,11 +160,7 @@ Running test: testPreciseCoverage
ranges : [ ranges : [
[0] : { [0] : {
count : 0 count : 0
endColumnNumber : 11
endLineNumber : 0
endOffset : 11 endOffset : 11
startColumnNumber : 0
startLineNumber : 0
startOffset : 0 startOffset : 0
} }
] ]
...@@ -280,11 +240,7 @@ Running test: testBestEffortCoveragePrecise ...@@ -280,11 +240,7 @@ Running test: testBestEffortCoveragePrecise
ranges : [ ranges : [
[0] : { [0] : {
count : 1 count : 1
endColumnNumber : 0
endLineNumber : 9
endOffset : 119 endOffset : 119
startColumnNumber : 0
startLineNumber : 0
startOffset : 0 startOffset : 0
} }
] ]
...@@ -294,11 +250,7 @@ Running test: testBestEffortCoveragePrecise ...@@ -294,11 +250,7 @@ Running test: testBestEffortCoveragePrecise
ranges : [ ranges : [
[0] : { [0] : {
count : 15 count : 15
endColumnNumber : 1
endLineNumber : 4
endOffset : 73 endOffset : 73
startColumnNumber : 0
startLineNumber : 1
startOffset : 1 startOffset : 1
} }
] ]
...@@ -308,11 +260,7 @@ Running test: testBestEffortCoveragePrecise ...@@ -308,11 +260,7 @@ Running test: testBestEffortCoveragePrecise
ranges : [ ranges : [
[0] : { [0] : {
count : 1 count : 1
endColumnNumber : 1
endLineNumber : 7
endOffset : 106 endOffset : 106
startColumnNumber : 1
startLineNumber : 5
startOffset : 75 startOffset : 75
} }
] ]
...@@ -328,11 +276,7 @@ Running test: testBestEffortCoveragePrecise ...@@ -328,11 +276,7 @@ Running test: testBestEffortCoveragePrecise
ranges : [ ranges : [
[0] : { [0] : {
count : 1 count : 1
endColumnNumber : 11
endLineNumber : 0
endOffset : 11 endOffset : 11
startColumnNumber : 0
startLineNumber : 0
startOffset : 0 startOffset : 0
} }
] ]
...@@ -355,11 +299,7 @@ Running test: testBestEffortCoveragePrecise ...@@ -355,11 +299,7 @@ Running test: testBestEffortCoveragePrecise
ranges : [ ranges : [
[0] : { [0] : {
count : 1 count : 1
endColumnNumber : 0
endLineNumber : 9
endOffset : 119 endOffset : 119
startColumnNumber : 0
startLineNumber : 0
startOffset : 0 startOffset : 0
} }
] ]
...@@ -369,11 +309,7 @@ Running test: testBestEffortCoveragePrecise ...@@ -369,11 +309,7 @@ Running test: testBestEffortCoveragePrecise
ranges : [ ranges : [
[0] : { [0] : {
count : 15 count : 15
endColumnNumber : 1
endLineNumber : 4
endOffset : 73 endOffset : 73
startColumnNumber : 0
startLineNumber : 1
startOffset : 1 startOffset : 1
} }
] ]
...@@ -383,11 +319,7 @@ Running test: testBestEffortCoveragePrecise ...@@ -383,11 +319,7 @@ Running test: testBestEffortCoveragePrecise
ranges : [ ranges : [
[0] : { [0] : {
count : 1 count : 1
endColumnNumber : 1
endLineNumber : 7
endOffset : 106 endOffset : 106
startColumnNumber : 1
startLineNumber : 5
startOffset : 75 startOffset : 75
} }
] ]
...@@ -403,11 +335,7 @@ Running test: testBestEffortCoveragePrecise ...@@ -403,11 +335,7 @@ Running test: testBestEffortCoveragePrecise
ranges : [ ranges : [
[0] : { [0] : {
count : 1 count : 1
endColumnNumber : 11
endLineNumber : 0
endOffset : 11 endOffset : 11
startColumnNumber : 0
startLineNumber : 0
startOffset : 0 startOffset : 0
} }
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment