Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(752)

Side by Side Diff: src/inspector/js_protocol.json

Issue 2700743002: [inspector] extend protocol for code coverage. (Closed)
Patch Set: comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 { 1 {
2 "version": { "major": "1", "minor": "2" }, 2 "version": { "major": "1", "minor": "2" },
3 "domains": [ 3 "domains": [
4 { 4 {
5 "domain": "Schema", 5 "domain": "Schema",
6 "description": "Provides information about the protocol schema.", 6 "description": "Provides information about the protocol schema.",
7 "types": [ 7 "types": [
8 { 8 {
9 "id": "Domain", 9 "id": "Domain",
10 "type": "object", 10 "type": "object",
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 { 197 {
198 "id": "StackTrace", 198 "id": "StackTrace",
199 "type": "object", 199 "type": "object",
200 "description": "Call frames for assertions or error messages.", 200 "description": "Call frames for assertions or error messages.",
201 "properties": [ 201 "properties": [
202 { "name": "description", "type": "string", "optional": true, "description": "String label of this stack trace. For async traces this may be a name of the function that initiated the async call." }, 202 { "name": "description", "type": "string", "optional": true, "description": "String label of this stack trace. For async traces this may be a name of the function that initiated the async call." },
203 { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "JavaScript function name." }, 203 { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "JavaScript function name." },
204 { "name": "parent", "$ref": "StackTrace", "optional": true, "description": "Asynchronous JavaScript stack trace that preceded this stack, if available." }, 204 { "name": "parent", "$ref": "StackTrace", "optional": true, "description": "Asynchronous JavaScript stack trace that preceded this stack, if available." },
205 { "name": "promiseCreationFrame", "$ref": "CallFrame", "opti onal": true, "experimental": true, "description": "Creation frame of the Promise which produced the next synchronous trace when resolved, if available." } 205 { "name": "promiseCreationFrame", "$ref": "CallFrame", "opti onal": true, "experimental": true, "description": "Creation frame of the Promise which produced the next synchronous trace when resolved, if available." }
206 ] 206 ]
207 },
208 { "id": "CoverageRange",
209 "type": "object",
210 "description": "Coverage data for a source range.",
211 "properties": [
pfeldman 2017/02/16 21:23:09 experimental: true
Yang 2017/02/20 11:24:42 Done.
212 { "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
213 { "name": "startLineNumber", "type": "integer", "description ": "JavaScript script line number (0-based) for the range start." },
214 { "name": "startColumnNumber", "type": "integer", "descripti on": "JavaScript script column number (0-based) for the range start." },
215 { "name": "endLineNumber", "type": "integer", "description": "JavaScript script line number (0-based) for the range end." },
216 { "name": "endColumnNumber", "type": "integer", "description ": "JavaScript script column number (0-based) for the range end." },
217 { "name": "nested", "type": "array", "items": { "$ref": "Cov erageRange" }, "description": "Nested inner coverage ranges." },
pfeldman 2017/02/16 21:23:09 I'd drop this.
Yang 2017/02/20 11:24:42 Done.
218 { "name": "count", "type": "integer", "description": "Collec ted execution count of the source range." }
219 ]
220 },
221 {
222 "id": "ScriptCoverage",
223 "type": "object",
224 "description": "Coverage data for a script.",
225 "properties": [
226 { "name": "scriptId", "$ref": "ScriptId", "description": "Ja vaScript script id." },
227 { "name": "url", "type": "string", "description": "JavaScrip t script name or url." },
228 { "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.
229 ]
207 } 230 }
208 ], 231 ],
209 "commands": [ 232 "commands": [
210 { 233 {
211 "name": "evaluate", 234 "name": "evaluate",
212 "parameters": [ 235 "parameters": [
213 { "name": "expression", "type": "string", "description": "Ex pression to evaluate." }, 236 { "name": "expression", "type": "string", "description": "Ex pression to evaluate." },
214 { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple object s." }, 237 { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple object s." },
215 { "name": "includeCommandLineAPI", "type": "boolean", "optio nal": true, "description": "Determines whether Command Line API should be availa ble during the evaluation." }, 238 { "name": "includeCommandLineAPI", "type": "boolean", "optio nal": true, "description": "Determines whether Command Line API should be availa ble during the evaluation." },
216 { "name": "silent", "type": "boolean", "optional": true, "de scription": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." }, 239 { "name": "silent", "type": "boolean", "optional": true, "de scription": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." },
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 { "name": "includeCommandLineAPI", "type": "boolean", "optio nal": true, "description": "Determines whether Command Line API should be availa ble during the evaluation." }, 359 { "name": "includeCommandLineAPI", "type": "boolean", "optio nal": true, "description": "Determines whether Command Line API should be availa ble during the evaluation." },
337 { "name": "returnByValue", "type": "boolean", "optional": tr ue, "description": "Whether the result is expected to be a JSON object which sho uld be sent by value." }, 360 { "name": "returnByValue", "type": "boolean", "optional": tr ue, "description": "Whether the result is expected to be a JSON object which sho uld be sent by value." },
338 { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result." }, 361 { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result." },
339 { "name": "awaitPromise", "type": "boolean", "optional": tru e, "description": "Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error." } 362 { "name": "awaitPromise", "type": "boolean", "optional": tru e, "description": "Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error." }
340 ], 363 ],
341 "returns": [ 364 "returns": [
342 { "name": "result", "$ref": "RemoteObject", "description": " Run result." }, 365 { "name": "result", "$ref": "RemoteObject", "description": " Run result." },
343 { "name": "exceptionDetails", "$ref": "ExceptionDetails", "o ptional": true, "description": "Exception details."} 366 { "name": "exceptionDetails", "$ref": "ExceptionDetails", "o ptional": true, "description": "Exception details."}
344 ], 367 ],
345 "description": "Runs script with given id in a given context." 368 "description": "Runs script with given id in a given context."
369 },
370 {
371 "name": "startPreciseCoverage",
372 "description": "Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Ena bling prevents running optimized code and keeps execution count records alive.",
373 "experimental": true
374 },
375 {
376 "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.
377 "description": "Disable precise code coverage. Disabling release s 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.
378 "experimental": true
379 },
380 {
381 "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
382 "returns": [
383 { "name": "result", "type": "array", "items": { "$ref": "Scr iptCoverage" }, "description": "Coverage data for the current isolate." }
384 ],
385 "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
386 "experimental": true
346 } 387 }
347 ], 388 ],
348 "events": [ 389 "events": [
349 { 390 {
350 "name": "executionContextCreated", 391 "name": "executionContextCreated",
351 "parameters": [ 392 "parameters": [
352 { "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created execution contex." } 393 { "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created execution contex." }
353 ], 394 ],
354 "description": "Issued when new execution context is created." 395 "description": "Issued when new execution context is created."
355 }, 396 },
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 { 1037 {
997 "name": "heapStatsUpdate", 1038 "name": "heapStatsUpdate",
998 "description": "If heap objects tracking has been started then b ackend may send update for one or more fragments", 1039 "description": "If heap objects tracking has been started then b ackend may send update for one or more fragments",
999 "parameters": [ 1040 "parameters": [
1000 { "name": "statsUpdate", "type": "array", "items": { "type": "integer" }, "description": "An array of triplets. Each triplet describes a fra gment. The first integer is the fragment index, the second integer is a total co unt of objects for the fragment, the third integer is a total size of the object s for the fragment."} 1041 { "name": "statsUpdate", "type": "array", "items": { "type": "integer" }, "description": "An array of triplets. Each triplet describes a fra gment. The first integer is the fragment index, the second integer is a total co unt of objects for the fragment, the third integer is a total size of the object s for the fragment."}
1001 ] 1042 ]
1002 } 1043 }
1003 ] 1044 ]
1004 }] 1045 }]
1005 } 1046 }
OLDNEW
« no previous file with comments | « no previous file | src/inspector/v8-runtime-agent-impl.h » ('j') | src/inspector/v8-runtime-agent-impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698