Chromium Code Reviews| Index: src/inspector/js_protocol.json |
| diff --git a/src/inspector/js_protocol.json b/src/inspector/js_protocol.json |
| index 8b08b0bda49b15093bee5a7896d15cc6205da653..6380bf991fc3a73fe6b819fdc894e138e5bc0e80 100644 |
| --- a/src/inspector/js_protocol.json |
| +++ b/src/inspector/js_protocol.json |
| @@ -204,6 +204,29 @@ |
| { "name": "parent", "$ref": "StackTrace", "optional": true, "description": "Asynchronous JavaScript stack trace that preceded this stack, if available." }, |
| { "name": "promiseCreationFrame", "$ref": "CallFrame", "optional": true, "experimental": true, "description": "Creation frame of the Promise which produced the next synchronous trace when resolved, if available." } |
| ] |
| + }, |
| + { "id": "CoverageRange", |
| + "type": "object", |
| + "description": "Coverage data for a source range.", |
| + "properties": [ |
|
pfeldman
2017/02/16 21:23:09
experimental: true
Yang
2017/02/20 11:24:42
Done.
|
| + { "name": "functionName", "type": "string", "description": "JavaScript function name." }, |
|
pfeldman
2017/02/16 21:23:09
Make it optional: not all of the ranges will have
Yang
2017/02/20 11:24:42
I now changed the structure so that we have this h
|
| + { "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": "nested", "type": "array", "items": { "$ref": "CoverageRange" }, "description": "Nested inner coverage ranges." }, |
|
pfeldman
2017/02/16 21:23:09
I'd drop this.
Yang
2017/02/20 11:24:42
Done.
|
| + { "name": "count", "type": "integer", "description": "Collected execution count of the source range." } |
| + ] |
| + }, |
| + { |
| + "id": "ScriptCoverage", |
| + "type": "object", |
| + "description": "Coverage data for a script.", |
| + "properties": [ |
| + { "name": "scriptId", "$ref": "ScriptId", "description": "JavaScript script id." }, |
| + { "name": "url", "type": "string", "description": "JavaScript script name or url." }, |
| + { "name": "toplevel", "$ref": "CoverageRange", "description": "Coverage ranges for the top-level function." } |
|
pfeldman
2017/02/16 21:23:09
I'd just flatten array of ranges.
Yang
2017/02/16 21:30:51
Wouldn't you have to reconstruct the nesting on th
pfeldman
2017/02/16 23:04:51
We might be implying different nesting. If we are
Yang
2017/02/17 05:35:54
In that case I suggest introducing a new type for
pfeldman
2017/02/17 17:59:39
function for future statement-level coverage.
Isn
Yang
2017/02/20 11:24:42
Done.
|
| + ] |
| } |
| ], |
| "commands": [ |
| @@ -343,6 +366,24 @@ |
| { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."} |
| ], |
| "description": "Runs script with given id in a given context." |
| + }, |
| + { |
| + "name": "startPreciseCoverage", |
| + "description": "Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and keeps execution count records alive.", |
| + "experimental": true |
| + }, |
| + { |
| + "name": "stopPreciseCoverage", |
|
pfeldman
2017/02/16 21:23:09
How do I get a result?
Yang
2017/02/16 21:30:51
By calling collectCoverage.
|
| + "description": "Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.", |
|
kozy
2017/02/16 16:47:19
Does this method reset counters?
Yang
2017/02/16 21:30:51
No. Starting resets counters.
|
| + "experimental": true |
| + }, |
| + { |
| + "name": "collectCoverage", |
|
pfeldman
2017/02/16 23:04:51
Does it reset counters? I would expect both stopPr
Yang
2017/02/17 05:35:54
So you want incremental counts from last time cove
pfeldman
2017/02/17 17:59:39
Right, Fadi's getBestEffortCoverage should not be
|
| + "returns": [ |
| + { "name": "result", "type": "array", "items": { "$ref": "ScriptCoverage" }, "description": "Coverage data for the current isolate." } |
| + ], |
| + "description": "Collect coverage data for the current isolate.", |
|
pfeldman
2017/02/16 21:23:09
We should not expose non-precise coverage, while t
Yang
2017/02/16 21:30:51
Fadi wanted exactly that though. He does not care
pfeldman
2017/02/16 23:04:51
We need to split best effort and precise coverage
Yang
2017/02/17 05:35:54
Data should be fairly good still, aside from funct
|
| + "experimental": true |
| } |
| ], |
| "events": [ |