Index: src/inspector/js_protocol.json |
diff --git a/src/inspector/js_protocol.json b/src/inspector/js_protocol.json |
index 8b08b0bda49b15093bee5a7896d15cc6205da653..1aa840cd5f6f2719da5bccf28655da9da08f36a6 100644 |
--- a/src/inspector/js_protocol.json |
+++ b/src/inspector/js_protocol.json |
@@ -204,6 +204,38 @@ |
{ "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": [ |
+ { "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": "count", "type": "integer", "description": "Collected execution count of the source range." } |
+ ], |
+ "experimental": "true" |
+ }, |
+ { "id": "FunctionCoverage", |
+ "type": "object", |
+ "description": "Coverage data for a JavaScript function.", |
+ "properties": [ |
+ { "name": "functionName", "type": "string", "description": "JavaScript function name." }, |
+ { "name": "ranges", "type": "array", "items": { "$ref": "CoverageRange" }, "description": "Source ranges inside the function with coverage data." } |
+ ], |
+ "experimental": "true" |
+ }, |
+ { |
+ "id": "ScriptCoverage", |
+ "type": "object", |
+ "description": "Coverage data for a JavaScript script.", |
+ "properties": [ |
+ { "name": "scriptId", "$ref": "ScriptId", "description": "JavaScript script id." }, |
+ { "name": "url", "type": "string", "description": "JavaScript script name or url." }, |
+ { "name": "functions", "type": "array", "items": { "$ref": "FunctionCoverage" }, "description": "Functions contained in the script that has coverage data." } |
+ ], |
+ "experimental": "true" |
} |
], |
"commands": [ |
@@ -343,6 +375,32 @@ |
{ "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 resets execution counters.", |
+ "experimental": true |
+ }, |
+ { |
+ "name": "stopPreciseCoverage", |
+ "description": "Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.", |
+ "experimental": true |
+ }, |
+ { |
+ "name": "takePreciseCoverage", |
+ "returns": [ |
+ { "name": "result", "type": "array", "items": { "$ref": "ScriptCoverage" }, "description": "Coverage data for the current isolate." } |
+ ], |
+ "description": "Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.", |
+ "experimental": true |
+ }, |
+ { |
+ "name": "getBestEffortCoverage", |
+ "returns": [ |
+ { "name": "result", "type": "array", "items": { "$ref": "ScriptCoverage" }, "description": "Coverage data for the current isolate." } |
+ ], |
+ "description": "Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.", |
+ "experimental": true |
} |
], |
"events": [ |