· 6 years ago · Sep 02, 2019, 05:02 AM
1diff --git a/deps/v8/include/APIDesign.md b/deps/v8/include/APIDesign.md
2index 8830fff7d1..fe42c8ed5d 100644
3--- a/deps/v8/include/APIDesign.md
4+++ b/deps/v8/include/APIDesign.md
5@@ -67,3 +67,6 @@ which in turn guarantees long-term stability of the API.
6 # The V8 inspector
7
8 All debugging capabilities of V8 should be exposed via the inspector protocol.
9+The exception to this are profiling features exposed via v8-profiler.h.
10+Changes to the inspector protocol need to ensure backwards compatibility and
11+commitment to maintain.
12diff --git a/deps/v8/include/OWNERS b/deps/v8/include/OWNERS
13index 7953cfe133..7ffbf74ce9 100644
14--- a/deps/v8/include/OWNERS
15+++ b/deps/v8/include/OWNERS
16@@ -1,16 +1,17 @@
17-set noparent
18-
19 adamk@chromium.org
20 danno@chromium.org
21 ulan@chromium.org
22 yangguo@chromium.org
23
24-per-file v8-internal.h=file://OWNERS
25+per-file *DEPS=file://COMMON_OWNERS
26+per-file v8-internal.h=file://COMMON_OWNERS
27 per-file v8-inspector.h=dgozman@chromium.org
28 per-file v8-inspector.h=pfeldman@chromium.org
29 per-file v8-inspector.h=kozyatinskiy@chromium.org
30 per-file v8-inspector-protocol.h=dgozman@chromium.org
31 per-file v8-inspector-protocol.h=pfeldman@chromium.org
32 per-file v8-inspector-protocol.h=kozyatinskiy@chromium.org
33+per-file js_protocol.pdl=dgozman@chromium.org
34+per-file js_protocol.pdl=pfeldman@chromium.org
35
36 # COMPONENT: Blink>JavaScript>API
37diff --git a/deps/v8/include/js_protocol-1.2.json b/deps/v8/include/js_protocol-1.2.json
38new file mode 100644
39index 0000000000..aff6806222
40--- /dev/null
41+++ b/deps/v8/include/js_protocol-1.2.json
42@@ -0,0 +1,997 @@
43+{
44+ "version": { "major": "1", "minor": "2" },
45+ "domains": [
46+ {
47+ "domain": "Schema",
48+ "description": "Provides information about the protocol schema.",
49+ "types": [
50+ {
51+ "id": "Domain",
52+ "type": "object",
53+ "description": "Description of the protocol domain.",
54+ "exported": true,
55+ "properties": [
56+ { "name": "name", "type": "string", "description": "Domain name." },
57+ { "name": "version", "type": "string", "description": "Domain version." }
58+ ]
59+ }
60+ ],
61+ "commands": [
62+ {
63+ "name": "getDomains",
64+ "description": "Returns supported domains.",
65+ "handlers": ["browser", "renderer"],
66+ "returns": [
67+ { "name": "domains", "type": "array", "items": { "$ref": "Domain" }, "description": "List of supported domains." }
68+ ]
69+ }
70+ ]
71+ },
72+ {
73+ "domain": "Runtime",
74+ "description": "Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.",
75+ "types": [
76+ {
77+ "id": "ScriptId",
78+ "type": "string",
79+ "description": "Unique script identifier."
80+ },
81+ {
82+ "id": "RemoteObjectId",
83+ "type": "string",
84+ "description": "Unique object identifier."
85+ },
86+ {
87+ "id": "UnserializableValue",
88+ "type": "string",
89+ "enum": ["Infinity", "NaN", "-Infinity", "-0"],
90+ "description": "Primitive value which cannot be JSON-stringified."
91+ },
92+ {
93+ "id": "RemoteObject",
94+ "type": "object",
95+ "description": "Mirror object referencing original JavaScript object.",
96+ "exported": true,
97+ "properties": [
98+ { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." },
99+ { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error", "proxy", "promise", "typedarray"], "description": "Object subtype hint. Specified for <code>object</code> type values only." },
100+ { "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for <code>object</code> type values only." },
101+ { "name": "value", "type": "any", "optional": true, "description": "Remote object value in case of primitive values or JSON values (if it was requested)." },
102+ { "name": "unserializableValue", "$ref": "UnserializableValue", "optional": true, "description": "Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property." },
103+ { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." },
104+ { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." },
105+ { "name": "preview", "$ref": "ObjectPreview", "optional": true, "description": "Preview containing abbreviated property values. Specified for <code>object</code> type values only.", "experimental": true },
106+ { "name": "customPreview", "$ref": "CustomPreview", "optional": true, "experimental": true}
107+ ]
108+ },
109+ {
110+ "id": "CustomPreview",
111+ "type": "object",
112+ "experimental": true,
113+ "properties": [
114+ { "name": "header", "type": "string"},
115+ { "name": "hasBody", "type": "boolean"},
116+ { "name": "formatterObjectId", "$ref": "RemoteObjectId"},
117+ { "name": "bindRemoteObjectFunctionId", "$ref": "RemoteObjectId" },
118+ { "name": "configObjectId", "$ref": "RemoteObjectId", "optional": true }
119+ ]
120+ },
121+ {
122+ "id": "ObjectPreview",
123+ "type": "object",
124+ "experimental": true,
125+ "description": "Object containing abbreviated remote object value.",
126+ "properties": [
127+ { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." },
128+ { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." },
129+ { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." },
130+ { "name": "overflow", "type": "boolean", "description": "True iff some of the properties or entries of the original object did not fit." },
131+ { "name": "properties", "type": "array", "items": { "$ref": "PropertyPreview" }, "description": "List of the properties." },
132+ { "name": "entries", "type": "array", "items": { "$ref": "EntryPreview" }, "optional": true, "description": "List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only." }
133+ ]
134+ },
135+ {
136+ "id": "PropertyPreview",
137+ "type": "object",
138+ "experimental": true,
139+ "properties": [
140+ { "name": "name", "type": "string", "description": "Property name." },
141+ { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol", "accessor"], "description": "Object type. Accessor means that the property itself is an accessor property." },
142+ { "name": "value", "type": "string", "optional": true, "description": "User-friendly property value string." },
143+ { "name": "valuePreview", "$ref": "ObjectPreview", "optional": true, "description": "Nested value preview." },
144+ { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }
145+ ]
146+ },
147+ {
148+ "id": "EntryPreview",
149+ "type": "object",
150+ "experimental": true,
151+ "properties": [
152+ { "name": "key", "$ref": "ObjectPreview", "optional": true, "description": "Preview of the key. Specified for map-like collection entries." },
153+ { "name": "value", "$ref": "ObjectPreview", "description": "Preview of the value." }
154+ ]
155+ },
156+ {
157+ "id": "PropertyDescriptor",
158+ "type": "object",
159+ "description": "Object property descriptor.",
160+ "properties": [
161+ { "name": "name", "type": "string", "description": "Property name or symbol description." },
162+ { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." },
163+ { "name": "writable", "type": "boolean", "optional": true, "description": "True if the value associated with the property may be changed (data descriptors only)." },
164+ { "name": "get", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." },
165+ { "name": "set", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)." },
166+ { "name": "configurable", "type": "boolean", "description": "True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object." },
167+ { "name": "enumerable", "type": "boolean", "description": "True if this property shows up during enumeration of the properties on the corresponding object." },
168+ { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." },
169+ { "name": "isOwn", "optional": true, "type": "boolean", "description": "True if the property is owned for the object." },
170+ { "name": "symbol", "$ref": "RemoteObject", "optional": true, "description": "Property symbol object, if the property is of the <code>symbol</code> type." }
171+ ]
172+ },
173+ {
174+ "id": "InternalPropertyDescriptor",
175+ "type": "object",
176+ "description": "Object internal property descriptor. This property isn't normally visible in JavaScript code.",
177+ "properties": [
178+ { "name": "name", "type": "string", "description": "Conventional property name." },
179+ { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." }
180+ ]
181+ },
182+ {
183+ "id": "CallArgument",
184+ "type": "object",
185+ "description": "Represents function call argument. Either remote object id <code>objectId</code>, primitive <code>value</code>, unserializable primitive value or neither of (for undefined) them should be specified.",
186+ "properties": [
187+ { "name": "value", "type": "any", "optional": true, "description": "Primitive value." },
188+ { "name": "unserializableValue", "$ref": "UnserializableValue", "optional": true, "description": "Primitive value which can not be JSON-stringified." },
189+ { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Remote object handle." }
190+ ]
191+ },
192+ {
193+ "id": "ExecutionContextId",
194+ "type": "integer",
195+ "description": "Id of an execution context."
196+ },
197+ {
198+ "id": "ExecutionContextDescription",
199+ "type": "object",
200+ "description": "Description of an isolated world.",
201+ "properties": [
202+ { "name": "id", "$ref": "ExecutionContextId", "description": "Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed." },
203+ { "name": "origin", "type": "string", "description": "Execution context origin." },
204+ { "name": "name", "type": "string", "description": "Human readable name describing given context." },
205+ { "name": "auxData", "type": "object", "optional": true, "description": "Embedder-specific auxiliary data." }
206+ ]
207+ },
208+ {
209+ "id": "ExceptionDetails",
210+ "type": "object",
211+ "description": "Detailed information about exception (or error) that was thrown during script compilation or execution.",
212+ "properties": [
213+ { "name": "exceptionId", "type": "integer", "description": "Exception id." },
214+ { "name": "text", "type": "string", "description": "Exception text, which should be used together with exception object when available." },
215+ { "name": "lineNumber", "type": "integer", "description": "Line number of the exception location (0-based)." },
216+ { "name": "columnNumber", "type": "integer", "description": "Column number of the exception location (0-based)." },
217+ { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Script ID of the exception location." },
218+ { "name": "url", "type": "string", "optional": true, "description": "URL of the exception location, to be used when the script was not reported." },
219+ { "name": "stackTrace", "$ref": "StackTrace", "optional": true, "description": "JavaScript stack trace if available." },
220+ { "name": "exception", "$ref": "RemoteObject", "optional": true, "description": "Exception object if available." },
221+ { "name": "executionContextId", "$ref": "ExecutionContextId", "optional": true, "description": "Identifier of the context where exception happened." }
222+ ]
223+ },
224+ {
225+ "id": "Timestamp",
226+ "type": "number",
227+ "description": "Number of milliseconds since epoch."
228+ },
229+ {
230+ "id": "CallFrame",
231+ "type": "object",
232+ "description": "Stack entry for runtime errors and assertions.",
233+ "properties": [
234+ { "name": "functionName", "type": "string", "description": "JavaScript function name." },
235+ { "name": "scriptId", "$ref": "ScriptId", "description": "JavaScript script id." },
236+ { "name": "url", "type": "string", "description": "JavaScript script name or url." },
237+ { "name": "lineNumber", "type": "integer", "description": "JavaScript script line number (0-based)." },
238+ { "name": "columnNumber", "type": "integer", "description": "JavaScript script column number (0-based)." }
239+ ]
240+ },
241+ {
242+ "id": "StackTrace",
243+ "type": "object",
244+ "description": "Call frames for assertions or error messages.",
245+ "exported": true,
246+ "properties": [
247+ { "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." },
248+ { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "JavaScript function name." },
249+ { "name": "parent", "$ref": "StackTrace", "optional": true, "description": "Asynchronous JavaScript stack trace that preceded this stack, if available." }
250+ ]
251+ }
252+ ],
253+ "commands": [
254+ {
255+ "name": "evaluate",
256+ "async": true,
257+ "parameters": [
258+ { "name": "expression", "type": "string", "description": "Expression to evaluate." },
259+ { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
260+ { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation." },
261+ { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." },
262+ { "name": "contextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page." },
263+ { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." },
264+ { "name": "generatePreview", "type": "boolean", "optional": true, "experimental": true, "description": "Whether preview should be generated for the result." },
265+ { "name": "userGesture", "type": "boolean", "optional": true, "experimental": true, "description": "Whether execution should be treated as initiated by user in the UI." },
266+ { "name": "awaitPromise", "type": "boolean", "optional":true, "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." }
267+ ],
268+ "returns": [
269+ { "name": "result", "$ref": "RemoteObject", "description": "Evaluation result." },
270+ { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
271+ ],
272+ "description": "Evaluates expression on global object."
273+ },
274+ {
275+ "name": "awaitPromise",
276+ "async": true,
277+ "parameters": [
278+ { "name": "promiseObjectId", "$ref": "RemoteObjectId", "description": "Identifier of the promise." },
279+ { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." },
280+ { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result." }
281+ ],
282+ "returns": [
283+ { "name": "result", "$ref": "RemoteObject", "description": "Promise result. Will contain rejected value if promise was rejected." },
284+ { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details if stack strace is available."}
285+ ],
286+ "description": "Add handler to promise with given promise object id."
287+ },
288+ {
289+ "name": "callFunctionOn",
290+ "async": true,
291+ "parameters": [
292+ { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to call function on." },
293+ { "name": "functionDeclaration", "type": "string", "description": "Declaration of the function to call." },
294+ { "name": "arguments", "type": "array", "items": { "$ref": "CallArgument", "description": "Call argument." }, "optional": true, "description": "Call arguments. All call arguments must belong to the same JavaScript world as the target object." },
295+ { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." },
296+ { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." },
297+ { "name": "generatePreview", "type": "boolean", "optional": true, "experimental": true, "description": "Whether preview should be generated for the result." },
298+ { "name": "userGesture", "type": "boolean", "optional": true, "experimental": true, "description": "Whether execution should be treated as initiated by user in the UI." },
299+ { "name": "awaitPromise", "type": "boolean", "optional":true, "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." }
300+ ],
301+ "returns": [
302+ { "name": "result", "$ref": "RemoteObject", "description": "Call result." },
303+ { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
304+ ],
305+ "description": "Calls function with given declaration on the given object. Object group of the result is inherited from the target object."
306+ },
307+ {
308+ "name": "getProperties",
309+ "parameters": [
310+ { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to return properties for." },
311+ { "name": "ownProperties", "optional": true, "type": "boolean", "description": "If true, returns properties belonging only to the element itself, not to its prototype chain." },
312+ { "name": "accessorPropertiesOnly", "optional": true, "type": "boolean", "description": "If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.", "experimental": true },
313+ { "name": "generatePreview", "type": "boolean", "optional": true, "experimental": true, "description": "Whether preview should be generated for the results." }
314+ ],
315+ "returns": [
316+ { "name": "result", "type": "array", "items": { "$ref": "PropertyDescriptor" }, "description": "Object properties." },
317+ { "name": "internalProperties", "optional": true, "type": "array", "items": { "$ref": "InternalPropertyDescriptor" }, "description": "Internal object properties (only of the element itself)." },
318+ { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
319+ ],
320+ "description": "Returns properties of a given object. Object group of the result is inherited from the target object."
321+ },
322+ {
323+ "name": "releaseObject",
324+ "parameters": [
325+ { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to release." }
326+ ],
327+ "description": "Releases remote object with given id."
328+ },
329+ {
330+ "name": "releaseObjectGroup",
331+ "parameters": [
332+ { "name": "objectGroup", "type": "string", "description": "Symbolic object group name." }
333+ ],
334+ "description": "Releases all remote objects that belong to a given group."
335+ },
336+ {
337+ "name": "runIfWaitingForDebugger",
338+ "description": "Tells inspected instance to run if it was waiting for debugger to attach."
339+ },
340+ {
341+ "name": "enable",
342+ "description": "Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context."
343+ },
344+ {
345+ "name": "disable",
346+ "description": "Disables reporting of execution contexts creation."
347+ },
348+ {
349+ "name": "discardConsoleEntries",
350+ "description": "Discards collected exceptions and console API calls."
351+ },
352+ {
353+ "name": "setCustomObjectFormatterEnabled",
354+ "parameters": [
355+ {
356+ "name": "enabled",
357+ "type": "boolean"
358+ }
359+ ],
360+ "experimental": true
361+ },
362+ {
363+ "name": "compileScript",
364+ "parameters": [
365+ { "name": "expression", "type": "string", "description": "Expression to compile." },
366+ { "name": "sourceURL", "type": "string", "description": "Source url to be set for the script." },
367+ { "name": "persistScript", "type": "boolean", "description": "Specifies whether the compiled script should be persisted." },
368+ { "name": "executionContextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page." }
369+ ],
370+ "returns": [
371+ { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Id of the script." },
372+ { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
373+ ],
374+ "description": "Compiles expression."
375+ },
376+ {
377+ "name": "runScript",
378+ "async": true,
379+ "parameters": [
380+ { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." },
381+ { "name": "executionContextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page." },
382+ { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
383+ { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." },
384+ { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation." },
385+ { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." },
386+ { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result." },
387+ { "name": "awaitPromise", "type": "boolean", "optional": true, "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." }
388+ ],
389+ "returns": [
390+ { "name": "result", "$ref": "RemoteObject", "description": "Run result." },
391+ { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
392+ ],
393+ "description": "Runs script with given id in a given context."
394+ }
395+ ],
396+ "events": [
397+ {
398+ "name": "executionContextCreated",
399+ "parameters": [
400+ { "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created execution contex." }
401+ ],
402+ "description": "Issued when new execution context is created."
403+ },
404+ {
405+ "name": "executionContextDestroyed",
406+ "parameters": [
407+ { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Id of the destroyed context" }
408+ ],
409+ "description": "Issued when execution context is destroyed."
410+ },
411+ {
412+ "name": "executionContextsCleared",
413+ "description": "Issued when all executionContexts were cleared in browser"
414+ },
415+ {
416+ "name": "exceptionThrown",
417+ "description": "Issued when exception was thrown and unhandled.",
418+ "parameters": [
419+ { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp of the exception." },
420+ { "name": "exceptionDetails", "$ref": "ExceptionDetails" }
421+ ]
422+ },
423+ {
424+ "name": "exceptionRevoked",
425+ "description": "Issued when unhandled exception was revoked.",
426+ "parameters": [
427+ { "name": "reason", "type": "string", "description": "Reason describing why exception was revoked." },
428+ { "name": "exceptionId", "type": "integer", "description": "The id of revoked exception, as reported in <code>exceptionUnhandled</code>." }
429+ ]
430+ },
431+ {
432+ "name": "consoleAPICalled",
433+ "description": "Issued when console API was called.",
434+ "parameters": [
435+ { "name": "type", "type": "string", "enum": ["log", "debug", "info", "error", "warning", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "profile", "profileEnd"], "description": "Type of the call." },
436+ { "name": "args", "type": "array", "items": { "$ref": "RemoteObject" }, "description": "Call arguments." },
437+ { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Identifier of the context where the call was made." },
438+ { "name": "timestamp", "$ref": "Timestamp", "description": "Call timestamp." },
439+ { "name": "stackTrace", "$ref": "StackTrace", "optional": true, "description": "Stack trace captured when the call was made." }
440+ ]
441+ },
442+ {
443+ "name": "inspectRequested",
444+ "description": "Issued when object should be inspected (for example, as a result of inspect() command line API call).",
445+ "parameters": [
446+ { "name": "object", "$ref": "RemoteObject" },
447+ { "name": "hints", "type": "object" }
448+ ]
449+ }
450+ ]
451+ },
452+ {
453+ "domain": "Debugger",
454+ "description": "Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.",
455+ "dependencies": ["Runtime"],
456+ "types": [
457+ {
458+ "id": "BreakpointId",
459+ "type": "string",
460+ "description": "Breakpoint identifier."
461+ },
462+ {
463+ "id": "CallFrameId",
464+ "type": "string",
465+ "description": "Call frame identifier."
466+ },
467+ {
468+ "id": "Location",
469+ "type": "object",
470+ "properties": [
471+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script identifier as reported in the <code>Debugger.scriptParsed</code>." },
472+ { "name": "lineNumber", "type": "integer", "description": "Line number in the script (0-based)." },
473+ { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number in the script (0-based)." }
474+ ],
475+ "description": "Location in the source code."
476+ },
477+ {
478+ "id": "ScriptPosition",
479+ "experimental": true,
480+ "type": "object",
481+ "properties": [
482+ { "name": "lineNumber", "type": "integer" },
483+ { "name": "columnNumber", "type": "integer" }
484+ ],
485+ "description": "Location in the source code."
486+ },
487+ {
488+ "id": "CallFrame",
489+ "type": "object",
490+ "properties": [
491+ { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused." },
492+ { "name": "functionName", "type": "string", "description": "Name of the JavaScript function called on this call frame." },
493+ { "name": "functionLocation", "$ref": "Location", "optional": true, "experimental": true, "description": "Location in the source code." },
494+ { "name": "location", "$ref": "Location", "description": "Location in the source code." },
495+ { "name": "scopeChain", "type": "array", "items": { "$ref": "Scope" }, "description": "Scope chain for this call frame." },
496+ { "name": "this", "$ref": "Runtime.RemoteObject", "description": "<code>this</code> object for this call frame." },
497+ { "name": "returnValue", "$ref": "Runtime.RemoteObject", "optional": true, "description": "The value being returned, if the function is at return point." }
498+ ],
499+ "description": "JavaScript call frame. Array of call frames form the call stack."
500+ },
501+ {
502+ "id": "Scope",
503+ "type": "object",
504+ "properties": [
505+ { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch", "block", "script"], "description": "Scope type." },
506+ { "name": "object", "$ref": "Runtime.RemoteObject", "description": "Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties." },
507+ { "name": "name", "type": "string", "optional": true },
508+ { "name": "startLocation", "$ref": "Location", "optional": true, "description": "Location in the source code where scope starts" },
509+ { "name": "endLocation", "$ref": "Location", "optional": true, "description": "Location in the source code where scope ends" }
510+ ],
511+ "description": "Scope description."
512+ },
513+ {
514+ "id": "SearchMatch",
515+ "type": "object",
516+ "description": "Search match for resource.",
517+ "exported": true,
518+ "properties": [
519+ { "name": "lineNumber", "type": "number", "description": "Line number in resource content." },
520+ { "name": "lineContent", "type": "string", "description": "Line with match content." }
521+ ],
522+ "experimental": true
523+ }
524+ ],
525+ "commands": [
526+ {
527+ "name": "enable",
528+ "description": "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received."
529+ },
530+ {
531+ "name": "disable",
532+ "description": "Disables debugger for given page."
533+ },
534+ {
535+ "name": "setBreakpointsActive",
536+ "parameters": [
537+ { "name": "active", "type": "boolean", "description": "New value for breakpoints active state." }
538+ ],
539+ "description": "Activates / deactivates all breakpoints on the page."
540+ },
541+ {
542+ "name": "setSkipAllPauses",
543+ "parameters": [
544+ { "name": "skip", "type": "boolean", "description": "New value for skip pauses state." }
545+ ],
546+ "description": "Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc)."
547+ },
548+ {
549+ "name": "setBreakpointByUrl",
550+ "parameters": [
551+ { "name": "lineNumber", "type": "integer", "description": "Line number to set breakpoint at." },
552+ { "name": "url", "type": "string", "optional": true, "description": "URL of the resources to set breakpoint on." },
553+ { "name": "urlRegex", "type": "string", "optional": true, "description": "Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified." },
554+ { "name": "columnNumber", "type": "integer", "optional": true, "description": "Offset in the line to set breakpoint at." },
555+ { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." }
556+ ],
557+ "returns": [
558+ { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." },
559+ { "name": "locations", "type": "array", "items": { "$ref": "Location" }, "description": "List of the locations this breakpoint resolved into upon addition." }
560+ ],
561+ "description": "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads."
562+ },
563+ {
564+ "name": "setBreakpoint",
565+ "parameters": [
566+ { "name": "location", "$ref": "Location", "description": "Location to set breakpoint in." },
567+ { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." }
568+ ],
569+ "returns": [
570+ { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." },
571+ { "name": "actualLocation", "$ref": "Location", "description": "Location this breakpoint resolved into." }
572+ ],
573+ "description": "Sets JavaScript breakpoint at a given location."
574+ },
575+ {
576+ "name": "removeBreakpoint",
577+ "parameters": [
578+ { "name": "breakpointId", "$ref": "BreakpointId" }
579+ ],
580+ "description": "Removes JavaScript breakpoint."
581+ },
582+ {
583+ "name": "continueToLocation",
584+ "parameters": [
585+ { "name": "location", "$ref": "Location", "description": "Location to continue to." }
586+ ],
587+ "description": "Continues execution until specific location is reached."
588+ },
589+ {
590+ "name": "stepOver",
591+ "description": "Steps over the statement."
592+ },
593+ {
594+ "name": "stepInto",
595+ "description": "Steps into the function call."
596+ },
597+ {
598+ "name": "stepOut",
599+ "description": "Steps out of the function call."
600+ },
601+ {
602+ "name": "pause",
603+ "description": "Stops on the next JavaScript statement."
604+ },
605+ {
606+ "name": "resume",
607+ "description": "Resumes JavaScript execution."
608+ },
609+ {
610+ "name": "searchInContent",
611+ "parameters": [
612+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to search in." },
613+ { "name": "query", "type": "string", "description": "String to search for." },
614+ { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." },
615+ { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." }
616+ ],
617+ "returns": [
618+ { "name": "result", "type": "array", "items": { "$ref": "SearchMatch" }, "description": "List of search matches." }
619+ ],
620+ "experimental": true,
621+ "description": "Searches for given string in script content."
622+ },
623+ {
624+ "name": "setScriptSource",
625+ "parameters": [
626+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to edit." },
627+ { "name": "scriptSource", "type": "string", "description": "New content of the script." },
628+ { "name": "dryRun", "type": "boolean", "optional": true, "description": " If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code." }
629+ ],
630+ "returns": [
631+ { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame" }, "description": "New stack trace in case editing has happened while VM was stopped." },
632+ { "name": "stackChanged", "type": "boolean", "optional": true, "description": "Whether current call stack was modified after applying the changes." },
633+ { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." },
634+ { "name": "exceptionDetails", "optional": true, "$ref": "Runtime.ExceptionDetails", "description": "Exception details if any." }
635+ ],
636+ "description": "Edits JavaScript source live."
637+ },
638+ {
639+ "name": "restartFrame",
640+ "parameters": [
641+ { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." }
642+ ],
643+ "returns": [
644+ { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "New stack trace." },
645+ { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." }
646+ ],
647+ "description": "Restarts particular call frame from the beginning."
648+ },
649+ {
650+ "name": "getScriptSource",
651+ "parameters": [
652+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to get source for." }
653+ ],
654+ "returns": [
655+ { "name": "scriptSource", "type": "string", "description": "Script source." }
656+ ],
657+ "description": "Returns source for the script with given id."
658+ },
659+ {
660+ "name": "setPauseOnExceptions",
661+ "parameters": [
662+ { "name": "state", "type": "string", "enum": ["none", "uncaught", "all"], "description": "Pause on exceptions mode." }
663+ ],
664+ "description": "Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>."
665+ },
666+ {
667+ "name": "evaluateOnCallFrame",
668+ "parameters": [
669+ { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." },
670+ { "name": "expression", "type": "string", "description": "Expression to evaluate." },
671+ { "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>)." },
672+ { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false." },
673+ { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." },
674+ { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." },
675+ { "name": "generatePreview", "type": "boolean", "optional": true, "experimental": true, "description": "Whether preview should be generated for the result." }
676+ ],
677+ "returns": [
678+ { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Object wrapper for the evaluation result." },
679+ { "name": "exceptionDetails", "$ref": "Runtime.ExceptionDetails", "optional": true, "description": "Exception details."}
680+ ],
681+ "description": "Evaluates expression on a given call frame."
682+ },
683+ {
684+ "name": "setVariableValue",
685+ "parameters": [
686+ { "name": "scopeNumber", "type": "integer", "description": "0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually." },
687+ { "name": "variableName", "type": "string", "description": "Variable name." },
688+ { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New variable value." },
689+ { "name": "callFrameId", "$ref": "CallFrameId", "description": "Id of callframe that holds variable." }
690+ ],
691+ "description": "Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually."
692+ },
693+ {
694+ "name": "setAsyncCallStackDepth",
695+ "parameters": [
696+ { "name": "maxDepth", "type": "integer", "description": "Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default)." }
697+ ],
698+ "description": "Enables or disables async call stacks tracking."
699+ },
700+ {
701+ "name": "setBlackboxPatterns",
702+ "parameters": [
703+ { "name": "patterns", "type": "array", "items": { "type": "string" }, "description": "Array of regexps that will be used to check script url for blackbox state." }
704+ ],
705+ "experimental": true,
706+ "description": "Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful."
707+ },
708+ {
709+ "name": "setBlackboxedRanges",
710+ "parameters": [
711+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script." },
712+ { "name": "positions", "type": "array", "items": { "$ref": "ScriptPosition" } }
713+ ],
714+ "experimental": true,
715+ "description": "Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted."
716+ }
717+ ],
718+ "events": [
719+ {
720+ "name": "scriptParsed",
721+ "parameters": [
722+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Identifier of the script parsed." },
723+ { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." },
724+ { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." },
725+ { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." },
726+ { "name": "endLine", "type": "integer", "description": "Last line of the script." },
727+ { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." },
728+ { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "description": "Specifies script creation context." },
729+ { "name": "hash", "type": "string", "description": "Content hash of the script."},
730+ { "name": "executionContextAuxData", "type": "object", "optional": true, "description": "Embedder-specific auxiliary data." },
731+ { "name": "isLiveEdit", "type": "boolean", "optional": true, "description": "True, if this script is generated as a result of the live edit operation.", "experimental": true },
732+ { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." },
733+ { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "experimental": true }
734+ ],
735+ "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger."
736+ },
737+ {
738+ "name": "scriptFailedToParse",
739+ "parameters": [
740+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Identifier of the script parsed." },
741+ { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." },
742+ { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." },
743+ { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." },
744+ { "name": "endLine", "type": "integer", "description": "Last line of the script." },
745+ { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." },
746+ { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "description": "Specifies script creation context." },
747+ { "name": "hash", "type": "string", "description": "Content hash of the script."},
748+ { "name": "executionContextAuxData", "type": "object", "optional": true, "description": "Embedder-specific auxiliary data." },
749+ { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." },
750+ { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL.", "experimental": true }
751+ ],
752+ "description": "Fired when virtual machine fails to parse the script."
753+ },
754+ {
755+ "name": "breakpointResolved",
756+ "parameters": [
757+ { "name": "breakpointId", "$ref": "BreakpointId", "description": "Breakpoint unique identifier." },
758+ { "name": "location", "$ref": "Location", "description": "Actual breakpoint location." }
759+ ],
760+ "description": "Fired when breakpoint is resolved to an actual script and location."
761+ },
762+ {
763+ "name": "paused",
764+ "parameters": [
765+ { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." },
766+ { "name": "reason", "type": "string", "enum": [ "XHR", "DOM", "EventListener", "exception", "assert", "debugCommand", "promiseRejection", "other" ], "description": "Pause reason.", "exported": true },
767+ { "name": "data", "type": "object", "optional": true, "description": "Object containing break-specific auxiliary properties." },
768+ { "name": "hitBreakpoints", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Hit breakpoints IDs" },
769+ { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." }
770+ ],
771+ "description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria."
772+ },
773+ {
774+ "name": "resumed",
775+ "description": "Fired when the virtual machine resumed execution."
776+ }
777+ ]
778+ },
779+ {
780+ "domain": "Console",
781+ "description": "This domain is deprecated - use Runtime or Log instead.",
782+ "dependencies": ["Runtime"],
783+ "deprecated": true,
784+ "types": [
785+ {
786+ "id": "ConsoleMessage",
787+ "type": "object",
788+ "description": "Console message.",
789+ "properties": [
790+ { "name": "source", "type": "string", "enum": ["xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "security", "other", "deprecation", "worker"], "description": "Message source." },
791+ { "name": "level", "type": "string", "enum": ["log", "warning", "error", "debug", "info"], "description": "Message severity." },
792+ { "name": "text", "type": "string", "description": "Message text." },
793+ { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." },
794+ { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message (1-based)." },
795+ { "name": "column", "type": "integer", "optional": true, "description": "Column number in the resource that generated this message (1-based)." }
796+ ]
797+ }
798+ ],
799+ "commands": [
800+ {
801+ "name": "enable",
802+ "description": "Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification."
803+ },
804+ {
805+ "name": "disable",
806+ "description": "Disables console domain, prevents further console messages from being reported to the client."
807+ },
808+ {
809+ "name": "clearMessages",
810+ "description": "Does nothing."
811+ }
812+ ],
813+ "events": [
814+ {
815+ "name": "messageAdded",
816+ "parameters": [
817+ { "name": "message", "$ref": "ConsoleMessage", "description": "Console message that has been added." }
818+ ],
819+ "description": "Issued when new console message is added."
820+ }
821+ ]
822+ },
823+ {
824+ "domain": "Profiler",
825+ "dependencies": ["Runtime", "Debugger"],
826+ "types": [
827+ {
828+ "id": "ProfileNode",
829+ "type": "object",
830+ "description": "Profile node. Holds callsite information, execution statistics and child nodes.",
831+ "properties": [
832+ { "name": "id", "type": "integer", "description": "Unique id of the node." },
833+ { "name": "callFrame", "$ref": "Runtime.CallFrame", "description": "Function location." },
834+ { "name": "hitCount", "type": "integer", "optional": true, "experimental": true, "description": "Number of samples where this node was on top of the call stack." },
835+ { "name": "children", "type": "array", "items": { "type": "integer" }, "optional": true, "description": "Child node ids." },
836+ { "name": "deoptReason", "type": "string", "optional": true, "description": "The reason of being not optimized. The function may be deoptimized or marked as don't optimize."},
837+ { "name": "positionTicks", "type": "array", "items": { "$ref": "PositionTickInfo" }, "optional": true, "experimental": true, "description": "An array of source position ticks." }
838+ ]
839+ },
840+ {
841+ "id": "Profile",
842+ "type": "object",
843+ "description": "Profile.",
844+ "properties": [
845+ { "name": "nodes", "type": "array", "items": { "$ref": "ProfileNode" }, "description": "The list of profile nodes. First item is the root node." },
846+ { "name": "startTime", "type": "number", "description": "Profiling start timestamp in microseconds." },
847+ { "name": "endTime", "type": "number", "description": "Profiling end timestamp in microseconds." },
848+ { "name": "samples", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Ids of samples top nodes." },
849+ { "name": "timeDeltas", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime." }
850+ ]
851+ },
852+ {
853+ "id": "PositionTickInfo",
854+ "type": "object",
855+ "experimental": true,
856+ "description": "Specifies a number of samples attributed to a certain source position.",
857+ "properties": [
858+ { "name": "line", "type": "integer", "description": "Source line number (1-based)." },
859+ { "name": "ticks", "type": "integer", "description": "Number of samples attributed to the source line." }
860+ ]
861+ }
862+ ],
863+ "commands": [
864+ {
865+ "name": "enable"
866+ },
867+ {
868+ "name": "disable"
869+ },
870+ {
871+ "name": "setSamplingInterval",
872+ "parameters": [
873+ { "name": "interval", "type": "integer", "description": "New sampling interval in microseconds." }
874+ ],
875+ "description": "Changes CPU profiler sampling interval. Must be called before CPU profiles recording started."
876+ },
877+ {
878+ "name": "start"
879+ },
880+ {
881+ "name": "stop",
882+ "returns": [
883+ { "name": "profile", "$ref": "Profile", "description": "Recorded profile." }
884+ ]
885+ }
886+ ],
887+ "events": [
888+ {
889+ "name": "consoleProfileStarted",
890+ "parameters": [
891+ { "name": "id", "type": "string" },
892+ { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profile()." },
893+ { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as an argument to console.profile()." }
894+ ],
895+ "description": "Sent when new profile recodring is started using console.profile() call."
896+ },
897+ {
898+ "name": "consoleProfileFinished",
899+ "parameters": [
900+ { "name": "id", "type": "string" },
901+ { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profileEnd()." },
902+ { "name": "profile", "$ref": "Profile" },
903+ { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as an argument to console.profile()." }
904+ ]
905+ }
906+ ]
907+ },
908+ {
909+ "domain": "HeapProfiler",
910+ "dependencies": ["Runtime"],
911+ "experimental": true,
912+ "types": [
913+ {
914+ "id": "HeapSnapshotObjectId",
915+ "type": "string",
916+ "description": "Heap snapshot object id."
917+ },
918+ {
919+ "id": "SamplingHeapProfileNode",
920+ "type": "object",
921+ "description": "Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.",
922+ "properties": [
923+ { "name": "callFrame", "$ref": "Runtime.CallFrame", "description": "Function location." },
924+ { "name": "selfSize", "type": "number", "description": "Allocations size in bytes for the node excluding children." },
925+ { "name": "children", "type": "array", "items": { "$ref": "SamplingHeapProfileNode" }, "description": "Child nodes." }
926+ ]
927+ },
928+ {
929+ "id": "SamplingHeapProfile",
930+ "type": "object",
931+ "description": "Profile.",
932+ "properties": [
933+ { "name": "head", "$ref": "SamplingHeapProfileNode" }
934+ ]
935+ }
936+ ],
937+ "commands": [
938+ {
939+ "name": "enable"
940+ },
941+ {
942+ "name": "disable"
943+ },
944+ {
945+ "name": "startTrackingHeapObjects",
946+ "parameters": [
947+ { "name": "trackAllocations", "type": "boolean", "optional": true }
948+ ]
949+ },
950+ {
951+ "name": "stopTrackingHeapObjects",
952+ "parameters": [
953+ { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped." }
954+ ]
955+ },
956+ {
957+ "name": "takeHeapSnapshot",
958+ "parameters": [
959+ { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken." }
960+ ]
961+ },
962+ {
963+ "name": "collectGarbage"
964+ },
965+ {
966+ "name": "getObjectByHeapObjectId",
967+ "parameters": [
968+ { "name": "objectId", "$ref": "HeapSnapshotObjectId" },
969+ { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }
970+ ],
971+ "returns": [
972+ { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." }
973+ ]
974+ },
975+ {
976+ "name": "addInspectedHeapObject",
977+ "parameters": [
978+ { "name": "heapObjectId", "$ref": "HeapSnapshotObjectId", "description": "Heap snapshot object id to be accessible by means of $x command line API." }
979+ ],
980+ "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions)."
981+ },
982+ {
983+ "name": "getHeapObjectId",
984+ "parameters": [
985+ { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to get heap object id for." }
986+ ],
987+ "returns": [
988+ { "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjectId", "description": "Id of the heap snapshot object corresponding to the passed remote object id." }
989+ ]
990+ },
991+ {
992+ "name": "startSampling",
993+ "parameters": [
994+ { "name": "samplingInterval", "type": "number", "optional": true, "description": "Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes." }
995+ ]
996+ },
997+ {
998+ "name": "stopSampling",
999+ "returns": [
1000+ { "name": "profile", "$ref": "SamplingHeapProfile", "description": "Recorded sampling heap profile." }
1001+ ]
1002+ }
1003+ ],
1004+ "events": [
1005+ {
1006+ "name": "addHeapSnapshotChunk",
1007+ "parameters": [
1008+ { "name": "chunk", "type": "string" }
1009+ ]
1010+ },
1011+ {
1012+ "name": "resetProfiles"
1013+ },
1014+ {
1015+ "name": "reportHeapSnapshotProgress",
1016+ "parameters": [
1017+ { "name": "done", "type": "integer" },
1018+ { "name": "total", "type": "integer" },
1019+ { "name": "finished", "type": "boolean", "optional": true }
1020+ ]
1021+ },
1022+ {
1023+ "name": "lastSeenObjectId",
1024+ "description": "If heap objects tracking has been started then backend regulary sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.",
1025+ "parameters": [
1026+ { "name": "lastSeenObjectId", "type": "integer" },
1027+ { "name": "timestamp", "type": "number" }
1028+ ]
1029+ },
1030+ {
1031+ "name": "heapStatsUpdate",
1032+ "description": "If heap objects tracking has been started then backend may send update for one or more fragments",
1033+ "parameters": [
1034+ { "name": "statsUpdate", "type": "array", "items": { "type": "integer" }, "description": "An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment."}
1035+ ]
1036+ }
1037+ ]
1038+ }]
1039+}
1040diff --git a/deps/v8/include/js_protocol-1.3.json b/deps/v8/include/js_protocol-1.3.json
1041new file mode 100644
1042index 0000000000..ea573d11a6
1043--- /dev/null
1044+++ b/deps/v8/include/js_protocol-1.3.json
1045@@ -0,0 +1,1205 @@
1046+{
1047+ "version": { "major": "1", "minor": "3" },
1048+ "domains": [
1049+ {
1050+ "domain": "Schema",
1051+ "description": "This domain is deprecated.",
1052+ "deprecated": true,
1053+ "types": [
1054+ {
1055+ "id": "Domain",
1056+ "type": "object",
1057+ "description": "Description of the protocol domain.",
1058+ "properties": [
1059+ { "name": "name", "type": "string", "description": "Domain name." },
1060+ { "name": "version", "type": "string", "description": "Domain version." }
1061+ ]
1062+ }
1063+ ],
1064+ "commands": [
1065+ {
1066+ "name": "getDomains",
1067+ "description": "Returns supported domains.",
1068+ "handlers": ["browser", "renderer"],
1069+ "returns": [
1070+ { "name": "domains", "type": "array", "items": { "$ref": "Domain" }, "description": "List of supported domains." }
1071+ ]
1072+ }
1073+ ]
1074+ },
1075+ {
1076+ "domain": "Runtime",
1077+ "description": "Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.",
1078+ "types": [
1079+ {
1080+ "id": "ScriptId",
1081+ "type": "string",
1082+ "description": "Unique script identifier."
1083+ },
1084+ {
1085+ "id": "RemoteObjectId",
1086+ "type": "string",
1087+ "description": "Unique object identifier."
1088+ },
1089+ {
1090+ "id": "UnserializableValue",
1091+ "type": "string",
1092+ "enum": ["Infinity", "NaN", "-Infinity", "-0"],
1093+ "description": "Primitive value which cannot be JSON-stringified."
1094+ },
1095+ {
1096+ "id": "RemoteObject",
1097+ "type": "object",
1098+ "description": "Mirror object referencing original JavaScript object.",
1099+ "properties": [
1100+ { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." },
1101+ { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error", "proxy", "promise", "typedarray"], "description": "Object subtype hint. Specified for <code>object</code> type values only." },
1102+ { "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for <code>object</code> type values only." },
1103+ { "name": "value", "type": "any", "optional": true, "description": "Remote object value in case of primitive values or JSON values (if it was requested)." },
1104+ { "name": "unserializableValue", "$ref": "UnserializableValue", "optional": true, "description": "Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property." },
1105+ { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." },
1106+ { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Unique object identifier (for non-primitive values)." },
1107+ { "name": "preview", "$ref": "ObjectPreview", "optional": true, "description": "Preview containing abbreviated property values. Specified for <code>object</code> type values only.", "experimental": true },
1108+ { "name": "customPreview", "$ref": "CustomPreview", "optional": true, "experimental": true}
1109+ ]
1110+ },
1111+ {
1112+ "id": "CustomPreview",
1113+ "type": "object",
1114+ "experimental": true,
1115+ "properties": [
1116+ { "name": "header", "type": "string"},
1117+ { "name": "hasBody", "type": "boolean"},
1118+ { "name": "formatterObjectId", "$ref": "RemoteObjectId"},
1119+ { "name": "bindRemoteObjectFunctionId", "$ref": "RemoteObjectId" },
1120+ { "name": "configObjectId", "$ref": "RemoteObjectId", "optional": true }
1121+ ]
1122+ },
1123+ {
1124+ "id": "ObjectPreview",
1125+ "type": "object",
1126+ "experimental": true,
1127+ "description": "Object containing abbreviated remote object value.",
1128+ "properties": [
1129+ { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol"], "description": "Object type." },
1130+ { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." },
1131+ { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." },
1132+ { "name": "overflow", "type": "boolean", "description": "True iff some of the properties or entries of the original object did not fit." },
1133+ { "name": "properties", "type": "array", "items": { "$ref": "PropertyPreview" }, "description": "List of the properties." },
1134+ { "name": "entries", "type": "array", "items": { "$ref": "EntryPreview" }, "optional": true, "description": "List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only." }
1135+ ]
1136+ },
1137+ {
1138+ "id": "PropertyPreview",
1139+ "type": "object",
1140+ "experimental": true,
1141+ "properties": [
1142+ { "name": "name", "type": "string", "description": "Property name." },
1143+ { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean", "symbol", "accessor"], "description": "Object type. Accessor means that the property itself is an accessor property." },
1144+ { "name": "value", "type": "string", "optional": true, "description": "User-friendly property value string." },
1145+ { "name": "valuePreview", "$ref": "ObjectPreview", "optional": true, "description": "Nested value preview." },
1146+ { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }
1147+ ]
1148+ },
1149+ {
1150+ "id": "EntryPreview",
1151+ "type": "object",
1152+ "experimental": true,
1153+ "properties": [
1154+ { "name": "key", "$ref": "ObjectPreview", "optional": true, "description": "Preview of the key. Specified for map-like collection entries." },
1155+ { "name": "value", "$ref": "ObjectPreview", "description": "Preview of the value." }
1156+ ]
1157+ },
1158+ {
1159+ "id": "PropertyDescriptor",
1160+ "type": "object",
1161+ "description": "Object property descriptor.",
1162+ "properties": [
1163+ { "name": "name", "type": "string", "description": "Property name or symbol description." },
1164+ { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." },
1165+ { "name": "writable", "type": "boolean", "optional": true, "description": "True if the value associated with the property may be changed (data descriptors only)." },
1166+ { "name": "get", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." },
1167+ { "name": "set", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only)." },
1168+ { "name": "configurable", "type": "boolean", "description": "True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object." },
1169+ { "name": "enumerable", "type": "boolean", "description": "True if this property shows up during enumeration of the properties on the corresponding object." },
1170+ { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." },
1171+ { "name": "isOwn", "optional": true, "type": "boolean", "description": "True if the property is owned for the object." },
1172+ { "name": "symbol", "$ref": "RemoteObject", "optional": true, "description": "Property symbol object, if the property is of the <code>symbol</code> type." }
1173+ ]
1174+ },
1175+ {
1176+ "id": "InternalPropertyDescriptor",
1177+ "type": "object",
1178+ "description": "Object internal property descriptor. This property isn't normally visible in JavaScript code.",
1179+ "properties": [
1180+ { "name": "name", "type": "string", "description": "Conventional property name." },
1181+ { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." }
1182+ ]
1183+ },
1184+ {
1185+ "id": "CallArgument",
1186+ "type": "object",
1187+ "description": "Represents function call argument. Either remote object id <code>objectId</code>, primitive <code>value</code>, unserializable primitive value or neither of (for undefined) them should be specified.",
1188+ "properties": [
1189+ { "name": "value", "type": "any", "optional": true, "description": "Primitive value or serializable javascript object." },
1190+ { "name": "unserializableValue", "$ref": "UnserializableValue", "optional": true, "description": "Primitive value which can not be JSON-stringified." },
1191+ { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Remote object handle." }
1192+ ]
1193+ },
1194+ {
1195+ "id": "ExecutionContextId",
1196+ "type": "integer",
1197+ "description": "Id of an execution context."
1198+ },
1199+ {
1200+ "id": "ExecutionContextDescription",
1201+ "type": "object",
1202+ "description": "Description of an isolated world.",
1203+ "properties": [
1204+ { "name": "id", "$ref": "ExecutionContextId", "description": "Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed." },
1205+ { "name": "origin", "type": "string", "description": "Execution context origin." },
1206+ { "name": "name", "type": "string", "description": "Human readable name describing given context." },
1207+ { "name": "auxData", "type": "object", "optional": true, "description": "Embedder-specific auxiliary data." }
1208+ ]
1209+ },
1210+ {
1211+ "id": "ExceptionDetails",
1212+ "type": "object",
1213+ "description": "Detailed information about exception (or error) that was thrown during script compilation or execution.",
1214+ "properties": [
1215+ { "name": "exceptionId", "type": "integer", "description": "Exception id." },
1216+ { "name": "text", "type": "string", "description": "Exception text, which should be used together with exception object when available." },
1217+ { "name": "lineNumber", "type": "integer", "description": "Line number of the exception location (0-based)." },
1218+ { "name": "columnNumber", "type": "integer", "description": "Column number of the exception location (0-based)." },
1219+ { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Script ID of the exception location." },
1220+ { "name": "url", "type": "string", "optional": true, "description": "URL of the exception location, to be used when the script was not reported." },
1221+ { "name": "stackTrace", "$ref": "StackTrace", "optional": true, "description": "JavaScript stack trace if available." },
1222+ { "name": "exception", "$ref": "RemoteObject", "optional": true, "description": "Exception object if available." },
1223+ { "name": "executionContextId", "$ref": "ExecutionContextId", "optional": true, "description": "Identifier of the context where exception happened." }
1224+ ]
1225+ },
1226+ {
1227+ "id": "Timestamp",
1228+ "type": "number",
1229+ "description": "Number of milliseconds since epoch."
1230+ },
1231+ {
1232+ "id": "CallFrame",
1233+ "type": "object",
1234+ "description": "Stack entry for runtime errors and assertions.",
1235+ "properties": [
1236+ { "name": "functionName", "type": "string", "description": "JavaScript function name." },
1237+ { "name": "scriptId", "$ref": "ScriptId", "description": "JavaScript script id." },
1238+ { "name": "url", "type": "string", "description": "JavaScript script name or url." },
1239+ { "name": "lineNumber", "type": "integer", "description": "JavaScript script line number (0-based)." },
1240+ { "name": "columnNumber", "type": "integer", "description": "JavaScript script column number (0-based)." }
1241+ ]
1242+ },
1243+ {
1244+ "id": "StackTrace",
1245+ "type": "object",
1246+ "description": "Call frames for assertions or error messages.",
1247+ "properties": [
1248+ { "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." },
1249+ { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "JavaScript function name." },
1250+ { "name": "parent", "$ref": "StackTrace", "optional": true, "description": "Asynchronous JavaScript stack trace that preceded this stack, if available." },
1251+ { "name": "parentId", "$ref": "StackTraceId", "optional": true, "experimental": true, "description": "Asynchronous JavaScript stack trace that preceded this stack, if available." }
1252+ ]
1253+ },
1254+ {
1255+ "id": "UniqueDebuggerId",
1256+ "type": "string",
1257+ "description": "Unique identifier of current debugger.",
1258+ "experimental": true
1259+ },
1260+ {
1261+ "id": "StackTraceId",
1262+ "type": "object",
1263+ "description": "If <code>debuggerId</code> is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See <code>Runtime.StackTrace</code> and <code>Debugger.paused</code> for usages.",
1264+ "properties": [
1265+ { "name": "id", "type": "string" },
1266+ { "name": "debuggerId", "$ref": "UniqueDebuggerId", "optional": true }
1267+ ],
1268+ "experimental": true
1269+ }
1270+ ],
1271+ "commands": [
1272+ {
1273+ "name": "evaluate",
1274+ "parameters": [
1275+ { "name": "expression", "type": "string", "description": "Expression to evaluate." },
1276+ { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
1277+ { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation." },
1278+ { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." },
1279+ { "name": "contextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page." },
1280+ { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." },
1281+ { "name": "generatePreview", "type": "boolean", "optional": true, "experimental": true, "description": "Whether preview should be generated for the result." },
1282+ { "name": "userGesture", "type": "boolean", "optional": true, "description": "Whether execution should be treated as initiated by user in the UI." },
1283+ { "name": "awaitPromise", "type": "boolean", "optional":true, "description": "Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved." }
1284+ ],
1285+ "returns": [
1286+ { "name": "result", "$ref": "RemoteObject", "description": "Evaluation result." },
1287+ { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
1288+ ],
1289+ "description": "Evaluates expression on global object."
1290+ },
1291+ {
1292+ "name": "awaitPromise",
1293+ "parameters": [
1294+ { "name": "promiseObjectId", "$ref": "RemoteObjectId", "description": "Identifier of the promise." },
1295+ { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." },
1296+ { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result." }
1297+ ],
1298+ "returns": [
1299+ { "name": "result", "$ref": "RemoteObject", "description": "Promise result. Will contain rejected value if promise was rejected." },
1300+ { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details if stack strace is available."}
1301+ ],
1302+ "description": "Add handler to promise with given promise object id."
1303+ },
1304+ {
1305+ "name": "callFunctionOn",
1306+ "parameters": [
1307+ { "name": "functionDeclaration", "type": "string", "description": "Declaration of the function to call." },
1308+ { "name": "objectId", "$ref": "RemoteObjectId", "optional": true, "description": "Identifier of the object to call function on. Either objectId or executionContextId should be specified." },
1309+ { "name": "arguments", "type": "array", "items": { "$ref": "CallArgument", "description": "Call argument." }, "optional": true, "description": "Call arguments. All call arguments must belong to the same JavaScript world as the target object." },
1310+ { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." },
1311+ { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." },
1312+ { "name": "generatePreview", "type": "boolean", "optional": true, "experimental": true, "description": "Whether preview should be generated for the result." },
1313+ { "name": "userGesture", "type": "boolean", "optional": true, "description": "Whether execution should be treated as initiated by user in the UI." },
1314+ { "name": "awaitPromise", "type": "boolean", "optional":true, "description": "Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved." },
1315+ { "name": "executionContextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified." },
1316+ { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object." }
1317+ ],
1318+ "returns": [
1319+ { "name": "result", "$ref": "RemoteObject", "description": "Call result." },
1320+ { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
1321+ ],
1322+ "description": "Calls function with given declaration on the given object. Object group of the result is inherited from the target object."
1323+ },
1324+ {
1325+ "name": "getProperties",
1326+ "parameters": [
1327+ { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to return properties for." },
1328+ { "name": "ownProperties", "optional": true, "type": "boolean", "description": "If true, returns properties belonging only to the element itself, not to its prototype chain." },
1329+ { "name": "accessorPropertiesOnly", "optional": true, "type": "boolean", "description": "If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.", "experimental": true },
1330+ { "name": "generatePreview", "type": "boolean", "optional": true, "experimental": true, "description": "Whether preview should be generated for the results." }
1331+ ],
1332+ "returns": [
1333+ { "name": "result", "type": "array", "items": { "$ref": "PropertyDescriptor" }, "description": "Object properties." },
1334+ { "name": "internalProperties", "optional": true, "type": "array", "items": { "$ref": "InternalPropertyDescriptor" }, "description": "Internal object properties (only of the element itself)." },
1335+ { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
1336+ ],
1337+ "description": "Returns properties of a given object. Object group of the result is inherited from the target object."
1338+ },
1339+ {
1340+ "name": "releaseObject",
1341+ "parameters": [
1342+ { "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to release." }
1343+ ],
1344+ "description": "Releases remote object with given id."
1345+ },
1346+ {
1347+ "name": "releaseObjectGroup",
1348+ "parameters": [
1349+ { "name": "objectGroup", "type": "string", "description": "Symbolic object group name." }
1350+ ],
1351+ "description": "Releases all remote objects that belong to a given group."
1352+ },
1353+ {
1354+ "name": "runIfWaitingForDebugger",
1355+ "description": "Tells inspected instance to run if it was waiting for debugger to attach."
1356+ },
1357+ {
1358+ "name": "enable",
1359+ "description": "Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context."
1360+ },
1361+ {
1362+ "name": "disable",
1363+ "description": "Disables reporting of execution contexts creation."
1364+ },
1365+ {
1366+ "name": "discardConsoleEntries",
1367+ "description": "Discards collected exceptions and console API calls."
1368+ },
1369+ {
1370+ "name": "setCustomObjectFormatterEnabled",
1371+ "parameters": [
1372+ {
1373+ "name": "enabled",
1374+ "type": "boolean"
1375+ }
1376+ ],
1377+ "experimental": true
1378+ },
1379+ {
1380+ "name": "compileScript",
1381+ "parameters": [
1382+ { "name": "expression", "type": "string", "description": "Expression to compile." },
1383+ { "name": "sourceURL", "type": "string", "description": "Source url to be set for the script." },
1384+ { "name": "persistScript", "type": "boolean", "description": "Specifies whether the compiled script should be persisted." },
1385+ { "name": "executionContextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page." }
1386+ ],
1387+ "returns": [
1388+ { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Id of the script." },
1389+ { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
1390+ ],
1391+ "description": "Compiles expression."
1392+ },
1393+ {
1394+ "name": "runScript",
1395+ "parameters": [
1396+ { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." },
1397+ { "name": "executionContextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page." },
1398+ { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
1399+ { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." },
1400+ { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation." },
1401+ { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." },
1402+ { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result." },
1403+ { "name": "awaitPromise", "type": "boolean", "optional": true, "description": "Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved." }
1404+ ],
1405+ "returns": [
1406+ { "name": "result", "$ref": "RemoteObject", "description": "Run result." },
1407+ { "name": "exceptionDetails", "$ref": "ExceptionDetails", "optional": true, "description": "Exception details."}
1408+ ],
1409+ "description": "Runs script with given id in a given context."
1410+ },
1411+ {
1412+ "name": "queryObjects",
1413+ "parameters": [
1414+ { "name": "prototypeObjectId", "$ref": "RemoteObjectId", "description": "Identifier of the prototype to return objects for." }
1415+ ],
1416+ "returns": [
1417+ { "name": "objects", "$ref": "RemoteObject", "description": "Array with objects." }
1418+ ]
1419+ },
1420+ {
1421+ "name": "globalLexicalScopeNames",
1422+ "parameters": [
1423+ { "name": "executionContextId", "$ref": "ExecutionContextId", "optional": true, "description": "Specifies in which execution context to lookup global scope variables." }
1424+ ],
1425+ "returns": [
1426+ { "name": "names", "type": "array", "items": { "type": "string" } }
1427+ ],
1428+ "description": "Returns all let, const and class variables from global scope."
1429+ }
1430+ ],
1431+ "events": [
1432+ {
1433+ "name": "executionContextCreated",
1434+ "parameters": [
1435+ { "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created execution context." }
1436+ ],
1437+ "description": "Issued when new execution context is created."
1438+ },
1439+ {
1440+ "name": "executionContextDestroyed",
1441+ "parameters": [
1442+ { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Id of the destroyed context" }
1443+ ],
1444+ "description": "Issued when execution context is destroyed."
1445+ },
1446+ {
1447+ "name": "executionContextsCleared",
1448+ "description": "Issued when all executionContexts were cleared in browser"
1449+ },
1450+ {
1451+ "name": "exceptionThrown",
1452+ "description": "Issued when exception was thrown and unhandled.",
1453+ "parameters": [
1454+ { "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp of the exception." },
1455+ { "name": "exceptionDetails", "$ref": "ExceptionDetails" }
1456+ ]
1457+ },
1458+ {
1459+ "name": "exceptionRevoked",
1460+ "description": "Issued when unhandled exception was revoked.",
1461+ "parameters": [
1462+ { "name": "reason", "type": "string", "description": "Reason describing why exception was revoked." },
1463+ { "name": "exceptionId", "type": "integer", "description": "The id of revoked exception, as reported in <code>exceptionThrown</code>." }
1464+ ]
1465+ },
1466+ {
1467+ "name": "consoleAPICalled",
1468+ "description": "Issued when console API was called.",
1469+ "parameters": [
1470+ { "name": "type", "type": "string", "enum": ["log", "debug", "info", "error", "warning", "dir", "dirxml", "table", "trace", "clear", "startGroup", "startGroupCollapsed", "endGroup", "assert", "profile", "profileEnd", "count", "timeEnd"], "description": "Type of the call." },
1471+ { "name": "args", "type": "array", "items": { "$ref": "RemoteObject" }, "description": "Call arguments." },
1472+ { "name": "executionContextId", "$ref": "ExecutionContextId", "description": "Identifier of the context where the call was made." },
1473+ { "name": "timestamp", "$ref": "Timestamp", "description": "Call timestamp." },
1474+ { "name": "stackTrace", "$ref": "StackTrace", "optional": true, "description": "Stack trace captured when the call was made." },
1475+ { "name": "context", "type": "string", "optional": true, "experimental": true, "description": "Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context." }
1476+ ]
1477+ },
1478+ {
1479+ "name": "inspectRequested",
1480+ "description": "Issued when object should be inspected (for example, as a result of inspect() command line API call).",
1481+ "parameters": [
1482+ { "name": "object", "$ref": "RemoteObject" },
1483+ { "name": "hints", "type": "object" }
1484+ ]
1485+ }
1486+ ]
1487+ },
1488+ {
1489+ "domain": "Debugger",
1490+ "description": "Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.",
1491+ "dependencies": ["Runtime"],
1492+ "types": [
1493+ {
1494+ "id": "BreakpointId",
1495+ "type": "string",
1496+ "description": "Breakpoint identifier."
1497+ },
1498+ {
1499+ "id": "CallFrameId",
1500+ "type": "string",
1501+ "description": "Call frame identifier."
1502+ },
1503+ {
1504+ "id": "Location",
1505+ "type": "object",
1506+ "properties": [
1507+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script identifier as reported in the <code>Debugger.scriptParsed</code>." },
1508+ { "name": "lineNumber", "type": "integer", "description": "Line number in the script (0-based)." },
1509+ { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number in the script (0-based)." }
1510+ ],
1511+ "description": "Location in the source code."
1512+ },
1513+ {
1514+ "id": "ScriptPosition",
1515+ "experimental": true,
1516+ "type": "object",
1517+ "properties": [
1518+ { "name": "lineNumber", "type": "integer" },
1519+ { "name": "columnNumber", "type": "integer" }
1520+ ],
1521+ "description": "Location in the source code."
1522+ },
1523+ {
1524+ "id": "CallFrame",
1525+ "type": "object",
1526+ "properties": [
1527+ { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused." },
1528+ { "name": "functionName", "type": "string", "description": "Name of the JavaScript function called on this call frame." },
1529+ { "name": "functionLocation", "$ref": "Location", "optional": true, "description": "Location in the source code." },
1530+ { "name": "location", "$ref": "Location", "description": "Location in the source code." },
1531+ { "name": "url", "type": "string", "description": "JavaScript script name or url." },
1532+ { "name": "scopeChain", "type": "array", "items": { "$ref": "Scope" }, "description": "Scope chain for this call frame." },
1533+ { "name": "this", "$ref": "Runtime.RemoteObject", "description": "<code>this</code> object for this call frame." },
1534+ { "name": "returnValue", "$ref": "Runtime.RemoteObject", "optional": true, "description": "The value being returned, if the function is at return point." }
1535+ ],
1536+ "description": "JavaScript call frame. Array of call frames form the call stack."
1537+ },
1538+ {
1539+ "id": "Scope",
1540+ "type": "object",
1541+ "properties": [
1542+ { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch", "block", "script", "eval", "module"], "description": "Scope type." },
1543+ { "name": "object", "$ref": "Runtime.RemoteObject", "description": "Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties." },
1544+ { "name": "name", "type": "string", "optional": true },
1545+ { "name": "startLocation", "$ref": "Location", "optional": true, "description": "Location in the source code where scope starts" },
1546+ { "name": "endLocation", "$ref": "Location", "optional": true, "description": "Location in the source code where scope ends" }
1547+ ],
1548+ "description": "Scope description."
1549+ },
1550+ {
1551+ "id": "SearchMatch",
1552+ "type": "object",
1553+ "description": "Search match for resource.",
1554+ "properties": [
1555+ { "name": "lineNumber", "type": "number", "description": "Line number in resource content." },
1556+ { "name": "lineContent", "type": "string", "description": "Line with match content." }
1557+ ]
1558+ },
1559+ {
1560+ "id": "BreakLocation",
1561+ "type": "object",
1562+ "properties": [
1563+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script identifier as reported in the <code>Debugger.scriptParsed</code>." },
1564+ { "name": "lineNumber", "type": "integer", "description": "Line number in the script (0-based)." },
1565+ { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number in the script (0-based)." },
1566+ { "name": "type", "type": "string", "enum": [ "debuggerStatement", "call", "return" ], "optional": true }
1567+ ]
1568+ }
1569+ ],
1570+ "commands": [
1571+ {
1572+ "name": "enable",
1573+ "returns": [
1574+ { "name": "debuggerId", "$ref": "Runtime.UniqueDebuggerId", "experimental": true, "description": "Unique identifier of the debugger." }
1575+ ],
1576+ "description": "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received."
1577+ },
1578+ {
1579+ "name": "disable",
1580+ "description": "Disables debugger for given page."
1581+ },
1582+ {
1583+ "name": "setBreakpointsActive",
1584+ "parameters": [
1585+ { "name": "active", "type": "boolean", "description": "New value for breakpoints active state." }
1586+ ],
1587+ "description": "Activates / deactivates all breakpoints on the page."
1588+ },
1589+ {
1590+ "name": "setSkipAllPauses",
1591+ "parameters": [
1592+ { "name": "skip", "type": "boolean", "description": "New value for skip pauses state." }
1593+ ],
1594+ "description": "Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc)."
1595+ },
1596+ {
1597+ "name": "setBreakpointByUrl",
1598+ "parameters": [
1599+ { "name": "lineNumber", "type": "integer", "description": "Line number to set breakpoint at." },
1600+ { "name": "url", "type": "string", "optional": true, "description": "URL of the resources to set breakpoint on." },
1601+ { "name": "urlRegex", "type": "string", "optional": true, "description": "Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified." },
1602+ { "name": "scriptHash", "type": "string", "optional": true, "description": "Script hash of the resources to set breakpoint on." },
1603+ { "name": "columnNumber", "type": "integer", "optional": true, "description": "Offset in the line to set breakpoint at." },
1604+ { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." }
1605+ ],
1606+ "returns": [
1607+ { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." },
1608+ { "name": "locations", "type": "array", "items": { "$ref": "Location" }, "description": "List of the locations this breakpoint resolved into upon addition." }
1609+ ],
1610+ "description": "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads."
1611+ },
1612+ {
1613+ "name": "setBreakpoint",
1614+ "parameters": [
1615+ { "name": "location", "$ref": "Location", "description": "Location to set breakpoint in." },
1616+ { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." }
1617+ ],
1618+ "returns": [
1619+ { "name": "breakpointId", "$ref": "BreakpointId", "description": "Id of the created breakpoint for further reference." },
1620+ { "name": "actualLocation", "$ref": "Location", "description": "Location this breakpoint resolved into." }
1621+ ],
1622+ "description": "Sets JavaScript breakpoint at a given location."
1623+ },
1624+ {
1625+ "name": "removeBreakpoint",
1626+ "parameters": [
1627+ { "name": "breakpointId", "$ref": "BreakpointId" }
1628+ ],
1629+ "description": "Removes JavaScript breakpoint."
1630+ },
1631+ {
1632+ "name": "getPossibleBreakpoints",
1633+ "parameters": [
1634+ { "name": "start", "$ref": "Location", "description": "Start of range to search possible breakpoint locations in." },
1635+ { "name": "end", "$ref": "Location", "optional": true, "description": "End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range." },
1636+ { "name": "restrictToFunction", "type": "boolean", "optional": true, "description": "Only consider locations which are in the same (non-nested) function as start." }
1637+ ],
1638+ "returns": [
1639+ { "name": "locations", "type": "array", "items": { "$ref": "BreakLocation" }, "description": "List of the possible breakpoint locations." }
1640+ ],
1641+ "description": "Returns possible locations for breakpoint. scriptId in start and end range locations should be the same."
1642+ },
1643+ {
1644+ "name": "continueToLocation",
1645+ "parameters": [
1646+ { "name": "location", "$ref": "Location", "description": "Location to continue to." },
1647+ { "name": "targetCallFrames", "type": "string", "enum": ["any", "current"], "optional": true }
1648+ ],
1649+ "description": "Continues execution until specific location is reached."
1650+ },
1651+ {
1652+ "name": "pauseOnAsyncCall",
1653+ "parameters": [
1654+ { "name": "parentStackTraceId", "$ref": "Runtime.StackTraceId", "description": "Debugger will pause when async call with given stack trace is started." }
1655+ ],
1656+ "experimental": true
1657+ },
1658+ {
1659+ "name": "stepOver",
1660+ "description": "Steps over the statement."
1661+ },
1662+ {
1663+ "name": "stepInto",
1664+ "parameters": [
1665+ { "name": "breakOnAsyncCall", "type": "boolean", "optional": true, "experimental": true, "description": "Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause." }
1666+ ],
1667+ "description": "Steps into the function call."
1668+ },
1669+ {
1670+ "name": "stepOut",
1671+ "description": "Steps out of the function call."
1672+ },
1673+ {
1674+ "name": "pause",
1675+ "description": "Stops on the next JavaScript statement."
1676+ },
1677+ {
1678+ "name": "scheduleStepIntoAsync",
1679+ "description": "This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.",
1680+ "experimental": true
1681+ },
1682+ {
1683+ "name": "resume",
1684+ "description": "Resumes JavaScript execution."
1685+ },
1686+ {
1687+ "name": "getStackTrace",
1688+ "parameters": [
1689+ { "name": "stackTraceId", "$ref": "Runtime.StackTraceId" }
1690+ ],
1691+ "returns": [
1692+ { "name": "stackTrace", "$ref": "Runtime.StackTrace" }
1693+ ],
1694+ "description": "Returns stack trace with given <code>stackTraceId</code>.",
1695+ "experimental": true
1696+ },
1697+ {
1698+ "name": "searchInContent",
1699+ "parameters": [
1700+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to search in." },
1701+ { "name": "query", "type": "string", "description": "String to search for." },
1702+ { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive." },
1703+ { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex." }
1704+ ],
1705+ "returns": [
1706+ { "name": "result", "type": "array", "items": { "$ref": "SearchMatch" }, "description": "List of search matches." }
1707+ ],
1708+ "description": "Searches for given string in script content."
1709+ },
1710+ {
1711+ "name": "setScriptSource",
1712+ "parameters": [
1713+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to edit." },
1714+ { "name": "scriptSource", "type": "string", "description": "New content of the script." },
1715+ { "name": "dryRun", "type": "boolean", "optional": true, "description": " If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code." }
1716+ ],
1717+ "returns": [
1718+ { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame" }, "description": "New stack trace in case editing has happened while VM was stopped." },
1719+ { "name": "stackChanged", "type": "boolean", "optional": true, "description": "Whether current call stack was modified after applying the changes." },
1720+ { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." },
1721+ { "name": "asyncStackTraceId", "$ref": "Runtime.StackTraceId", "optional": true, "experimental": true, "description": "Async stack trace, if any." },
1722+ { "name": "exceptionDetails", "optional": true, "$ref": "Runtime.ExceptionDetails", "description": "Exception details if any." }
1723+ ],
1724+ "description": "Edits JavaScript source live."
1725+ },
1726+ {
1727+ "name": "restartFrame",
1728+ "parameters": [
1729+ { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." }
1730+ ],
1731+ "returns": [
1732+ { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "New stack trace." },
1733+ { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." },
1734+ { "name": "asyncStackTraceId", "$ref": "Runtime.StackTraceId", "optional": true, "experimental": true, "description": "Async stack trace, if any." }
1735+ ],
1736+ "description": "Restarts particular call frame from the beginning."
1737+ },
1738+ {
1739+ "name": "getScriptSource",
1740+ "parameters": [
1741+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script to get source for." }
1742+ ],
1743+ "returns": [
1744+ { "name": "scriptSource", "type": "string", "description": "Script source." }
1745+ ],
1746+ "description": "Returns source for the script with given id."
1747+ },
1748+ {
1749+ "name": "setPauseOnExceptions",
1750+ "parameters": [
1751+ { "name": "state", "type": "string", "enum": ["none", "uncaught", "all"], "description": "Pause on exceptions mode." }
1752+ ],
1753+ "description": "Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>."
1754+ },
1755+ {
1756+ "name": "evaluateOnCallFrame",
1757+ "parameters": [
1758+ { "name": "callFrameId", "$ref": "CallFrameId", "description": "Call frame identifier to evaluate on." },
1759+ { "name": "expression", "type": "string", "description": "Expression to evaluate." },
1760+ { "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>)." },
1761+ { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false." },
1762+ { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state." },
1763+ { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." },
1764+ { "name": "generatePreview", "type": "boolean", "optional": true, "experimental": true, "description": "Whether preview should be generated for the result." },
1765+ { "name": "throwOnSideEffect", "type": "boolean", "optional": true, "description": "Whether to throw an exception if side effect cannot be ruled out during evaluation." }
1766+ ],
1767+ "returns": [
1768+ { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Object wrapper for the evaluation result." },
1769+ { "name": "exceptionDetails", "$ref": "Runtime.ExceptionDetails", "optional": true, "description": "Exception details."}
1770+ ],
1771+ "description": "Evaluates expression on a given call frame."
1772+ },
1773+ {
1774+ "name": "setVariableValue",
1775+ "parameters": [
1776+ { "name": "scopeNumber", "type": "integer", "description": "0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually." },
1777+ { "name": "variableName", "type": "string", "description": "Variable name." },
1778+ { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New variable value." },
1779+ { "name": "callFrameId", "$ref": "CallFrameId", "description": "Id of callframe that holds variable." }
1780+ ],
1781+ "description": "Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually."
1782+ },
1783+ {
1784+ "name": "setReturnValue",
1785+ "parameters": [
1786+ { "name": "newValue", "$ref": "Runtime.CallArgument", "description": "New return value." }
1787+ ],
1788+ "experimental": true,
1789+ "description": "Changes return value in top frame. Available only at return break position."
1790+ },
1791+ {
1792+ "name": "setAsyncCallStackDepth",
1793+ "parameters": [
1794+ { "name": "maxDepth", "type": "integer", "description": "Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default)." }
1795+ ],
1796+ "description": "Enables or disables async call stacks tracking."
1797+ },
1798+ {
1799+ "name": "setBlackboxPatterns",
1800+ "parameters": [
1801+ { "name": "patterns", "type": "array", "items": { "type": "string" }, "description": "Array of regexps that will be used to check script url for blackbox state." }
1802+ ],
1803+ "experimental": true,
1804+ "description": "Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful."
1805+ },
1806+ {
1807+ "name": "setBlackboxedRanges",
1808+ "parameters": [
1809+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Id of the script." },
1810+ { "name": "positions", "type": "array", "items": { "$ref": "ScriptPosition" } }
1811+ ],
1812+ "experimental": true,
1813+ "description": "Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted."
1814+ }
1815+ ],
1816+ "events": [
1817+ {
1818+ "name": "scriptParsed",
1819+ "parameters": [
1820+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Identifier of the script parsed." },
1821+ { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." },
1822+ { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." },
1823+ { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." },
1824+ { "name": "endLine", "type": "integer", "description": "Last line of the script." },
1825+ { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." },
1826+ { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "description": "Specifies script creation context." },
1827+ { "name": "hash", "type": "string", "description": "Content hash of the script."},
1828+ { "name": "executionContextAuxData", "type": "object", "optional": true, "description": "Embedder-specific auxiliary data." },
1829+ { "name": "isLiveEdit", "type": "boolean", "optional": true, "description": "True, if this script is generated as a result of the live edit operation.", "experimental": true },
1830+ { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." },
1831+ { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL." },
1832+ { "name": "isModule", "type": "boolean", "optional": true, "description": "True, if this script is ES6 module." },
1833+ { "name": "length", "type": "integer", "optional": true, "description": "This script length." },
1834+ { "name": "stackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "JavaScript top stack frame of where the script parsed event was triggered if available.", "experimental": true }
1835+ ],
1836+ "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger."
1837+ },
1838+ {
1839+ "name": "scriptFailedToParse",
1840+ "parameters": [
1841+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Identifier of the script parsed." },
1842+ { "name": "url", "type": "string", "description": "URL or name of the script parsed (if any)." },
1843+ { "name": "startLine", "type": "integer", "description": "Line offset of the script within the resource with given URL (for script tags)." },
1844+ { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." },
1845+ { "name": "endLine", "type": "integer", "description": "Last line of the script." },
1846+ { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." },
1847+ { "name": "executionContextId", "$ref": "Runtime.ExecutionContextId", "description": "Specifies script creation context." },
1848+ { "name": "hash", "type": "string", "description": "Content hash of the script."},
1849+ { "name": "executionContextAuxData", "type": "object", "optional": true, "description": "Embedder-specific auxiliary data." },
1850+ { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." },
1851+ { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "True, if this script has sourceURL." },
1852+ { "name": "isModule", "type": "boolean", "optional": true, "description": "True, if this script is ES6 module." },
1853+ { "name": "length", "type": "integer", "optional": true, "description": "This script length." },
1854+ { "name": "stackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "JavaScript top stack frame of where the script parsed event was triggered if available.", "experimental": true }
1855+ ],
1856+ "description": "Fired when virtual machine fails to parse the script."
1857+ },
1858+ {
1859+ "name": "breakpointResolved",
1860+ "parameters": [
1861+ { "name": "breakpointId", "$ref": "BreakpointId", "description": "Breakpoint unique identifier." },
1862+ { "name": "location", "$ref": "Location", "description": "Actual breakpoint location." }
1863+ ],
1864+ "description": "Fired when breakpoint is resolved to an actual script and location."
1865+ },
1866+ {
1867+ "name": "paused",
1868+ "parameters": [
1869+ { "name": "callFrames", "type": "array", "items": { "$ref": "CallFrame" }, "description": "Call stack the virtual machine stopped on." },
1870+ { "name": "reason", "type": "string", "enum": [ "XHR", "DOM", "EventListener", "exception", "assert", "debugCommand", "promiseRejection", "OOM", "other", "ambiguous" ], "description": "Pause reason." },
1871+ { "name": "data", "type": "object", "optional": true, "description": "Object containing break-specific auxiliary properties." },
1872+ { "name": "hitBreakpoints", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Hit breakpoints IDs" },
1873+ { "name": "asyncStackTrace", "$ref": "Runtime.StackTrace", "optional": true, "description": "Async stack trace, if any." },
1874+ { "name": "asyncStackTraceId", "$ref": "Runtime.StackTraceId", "optional": true, "experimental": true, "description": "Async stack trace, if any." },
1875+ { "name": "asyncCallStackTraceId", "$ref": "Runtime.StackTraceId", "optional": true, "experimental": true, "description": "Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after <code>Debugger.stepInto</code> call with <code>breakOnAsynCall</code> flag." }
1876+ ],
1877+ "description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria."
1878+ },
1879+ {
1880+ "name": "resumed",
1881+ "description": "Fired when the virtual machine resumed execution."
1882+ }
1883+ ]
1884+ },
1885+ {
1886+ "domain": "Console",
1887+ "description": "This domain is deprecated - use Runtime or Log instead.",
1888+ "dependencies": ["Runtime"],
1889+ "deprecated": true,
1890+ "types": [
1891+ {
1892+ "id": "ConsoleMessage",
1893+ "type": "object",
1894+ "description": "Console message.",
1895+ "properties": [
1896+ { "name": "source", "type": "string", "enum": ["xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "security", "other", "deprecation", "worker"], "description": "Message source." },
1897+ { "name": "level", "type": "string", "enum": ["log", "warning", "error", "debug", "info"], "description": "Message severity." },
1898+ { "name": "text", "type": "string", "description": "Message text." },
1899+ { "name": "url", "type": "string", "optional": true, "description": "URL of the message origin." },
1900+ { "name": "line", "type": "integer", "optional": true, "description": "Line number in the resource that generated this message (1-based)." },
1901+ { "name": "column", "type": "integer", "optional": true, "description": "Column number in the resource that generated this message (1-based)." }
1902+ ]
1903+ }
1904+ ],
1905+ "commands": [
1906+ {
1907+ "name": "enable",
1908+ "description": "Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification."
1909+ },
1910+ {
1911+ "name": "disable",
1912+ "description": "Disables console domain, prevents further console messages from being reported to the client."
1913+ },
1914+ {
1915+ "name": "clearMessages",
1916+ "description": "Does nothing."
1917+ }
1918+ ],
1919+ "events": [
1920+ {
1921+ "name": "messageAdded",
1922+ "parameters": [
1923+ { "name": "message", "$ref": "ConsoleMessage", "description": "Console message that has been added." }
1924+ ],
1925+ "description": "Issued when new console message is added."
1926+ }
1927+ ]
1928+ },
1929+ {
1930+ "domain": "Profiler",
1931+ "dependencies": ["Runtime", "Debugger"],
1932+ "types": [
1933+ {
1934+ "id": "ProfileNode",
1935+ "type": "object",
1936+ "description": "Profile node. Holds callsite information, execution statistics and child nodes.",
1937+ "properties": [
1938+ { "name": "id", "type": "integer", "description": "Unique id of the node." },
1939+ { "name": "callFrame", "$ref": "Runtime.CallFrame", "description": "Function location." },
1940+ { "name": "hitCount", "type": "integer", "optional": true, "description": "Number of samples where this node was on top of the call stack." },
1941+ { "name": "children", "type": "array", "items": { "type": "integer" }, "optional": true, "description": "Child node ids." },
1942+ { "name": "deoptReason", "type": "string", "optional": true, "description": "The reason of being not optimized. The function may be deoptimized or marked as don't optimize."},
1943+ { "name": "positionTicks", "type": "array", "items": { "$ref": "PositionTickInfo" }, "optional": true, "description": "An array of source position ticks." }
1944+ ]
1945+ },
1946+ {
1947+ "id": "Profile",
1948+ "type": "object",
1949+ "description": "Profile.",
1950+ "properties": [
1951+ { "name": "nodes", "type": "array", "items": { "$ref": "ProfileNode" }, "description": "The list of profile nodes. First item is the root node." },
1952+ { "name": "startTime", "type": "number", "description": "Profiling start timestamp in microseconds." },
1953+ { "name": "endTime", "type": "number", "description": "Profiling end timestamp in microseconds." },
1954+ { "name": "samples", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Ids of samples top nodes." },
1955+ { "name": "timeDeltas", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime." }
1956+ ]
1957+ },
1958+ {
1959+ "id": "PositionTickInfo",
1960+ "type": "object",
1961+ "description": "Specifies a number of samples attributed to a certain source position.",
1962+ "properties": [
1963+ { "name": "line", "type": "integer", "description": "Source line number (1-based)." },
1964+ { "name": "ticks", "type": "integer", "description": "Number of samples attributed to the source line." }
1965+ ]
1966+ },
1967+ { "id": "CoverageRange",
1968+ "type": "object",
1969+ "description": "Coverage data for a source range.",
1970+ "properties": [
1971+ { "name": "startOffset", "type": "integer", "description": "JavaScript script source offset for the range start." },
1972+ { "name": "endOffset", "type": "integer", "description": "JavaScript script source offset for the range end." },
1973+ { "name": "count", "type": "integer", "description": "Collected execution count of the source range." }
1974+ ]
1975+ },
1976+ { "id": "FunctionCoverage",
1977+ "type": "object",
1978+ "description": "Coverage data for a JavaScript function.",
1979+ "properties": [
1980+ { "name": "functionName", "type": "string", "description": "JavaScript function name." },
1981+ { "name": "ranges", "type": "array", "items": { "$ref": "CoverageRange" }, "description": "Source ranges inside the function with coverage data." },
1982+ { "name": "isBlockCoverage", "type": "boolean", "description": "Whether coverage data for this function has block granularity." }
1983+ ]
1984+ },
1985+ {
1986+ "id": "ScriptCoverage",
1987+ "type": "object",
1988+ "description": "Coverage data for a JavaScript script.",
1989+ "properties": [
1990+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "JavaScript script id." },
1991+ { "name": "url", "type": "string", "description": "JavaScript script name or url." },
1992+ { "name": "functions", "type": "array", "items": { "$ref": "FunctionCoverage" }, "description": "Functions contained in the script that has coverage data." }
1993+ ]
1994+ },
1995+ { "id": "TypeObject",
1996+ "type": "object",
1997+ "description": "Describes a type collected during runtime.",
1998+ "properties": [
1999+ { "name": "name", "type": "string", "description": "Name of a type collected with type profiling." }
2000+ ],
2001+ "experimental": true
2002+ },
2003+ { "id": "TypeProfileEntry",
2004+ "type": "object",
2005+ "description": "Source offset and types for a parameter or return value.",
2006+ "properties": [
2007+ { "name": "offset", "type": "integer", "description": "Source offset of the parameter or end of function for return values." },
2008+ { "name": "types", "type": "array", "items": {"$ref": "TypeObject"}, "description": "The types for this parameter or return value."}
2009+ ],
2010+ "experimental": true
2011+ },
2012+ {
2013+ "id": "ScriptTypeProfile",
2014+ "type": "object",
2015+ "description": "Type profile data collected during runtime for a JavaScript script.",
2016+ "properties": [
2017+ { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "JavaScript script id." },
2018+ { "name": "url", "type": "string", "description": "JavaScript script name or url." },
2019+ { "name": "entries", "type": "array", "items": { "$ref": "TypeProfileEntry" }, "description": "Type profile entries for parameters and return values of the functions in the script." }
2020+ ],
2021+ "experimental": true
2022+ }
2023+ ],
2024+ "commands": [
2025+ {
2026+ "name": "enable"
2027+ },
2028+ {
2029+ "name": "disable"
2030+ },
2031+ {
2032+ "name": "setSamplingInterval",
2033+ "parameters": [
2034+ { "name": "interval", "type": "integer", "description": "New sampling interval in microseconds." }
2035+ ],
2036+ "description": "Changes CPU profiler sampling interval. Must be called before CPU profiles recording started."
2037+ },
2038+ {
2039+ "name": "start"
2040+ },
2041+ {
2042+ "name": "stop",
2043+ "returns": [
2044+ { "name": "profile", "$ref": "Profile", "description": "Recorded profile." }
2045+ ]
2046+ },
2047+ {
2048+ "name": "startPreciseCoverage",
2049+ "parameters": [
2050+ { "name": "callCount", "type": "boolean", "optional": true, "description": "Collect accurate call counts beyond simple 'covered' or 'not covered'." },
2051+ { "name": "detailed", "type": "boolean", "optional": true, "description": "Collect block-based coverage." }
2052+ ],
2053+ "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."
2054+ },
2055+ {
2056+ "name": "stopPreciseCoverage",
2057+ "description": "Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code."
2058+ },
2059+ {
2060+ "name": "takePreciseCoverage",
2061+ "returns": [
2062+ { "name": "result", "type": "array", "items": { "$ref": "ScriptCoverage" }, "description": "Coverage data for the current isolate." }
2063+ ],
2064+ "description": "Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started."
2065+ },
2066+ {
2067+ "name": "getBestEffortCoverage",
2068+ "returns": [
2069+ { "name": "result", "type": "array", "items": { "$ref": "ScriptCoverage" }, "description": "Coverage data for the current isolate." }
2070+ ],
2071+ "description": "Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection."
2072+ },
2073+ {
2074+ "name": "startTypeProfile",
2075+ "description": "Enable type profile.",
2076+ "experimental": true
2077+ },
2078+ {
2079+ "name": "stopTypeProfile",
2080+ "description": "Disable type profile. Disabling releases type profile data collected so far.",
2081+ "experimental": true
2082+ },
2083+ {
2084+ "name": "takeTypeProfile",
2085+ "returns": [
2086+ { "name": "result", "type": "array", "items": { "$ref": "ScriptTypeProfile" }, "description": "Type profile for all scripts since startTypeProfile() was turned on." }
2087+ ],
2088+ "description": "Collect type profile.",
2089+ "experimental": true
2090+ }
2091+ ],
2092+ "events": [
2093+ {
2094+ "name": "consoleProfileStarted",
2095+ "parameters": [
2096+ { "name": "id", "type": "string" },
2097+ { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profile()." },
2098+ { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as an argument to console.profile()." }
2099+ ],
2100+ "description": "Sent when new profile recording is started using console.profile() call."
2101+ },
2102+ {
2103+ "name": "consoleProfileFinished",
2104+ "parameters": [
2105+ { "name": "id", "type": "string" },
2106+ { "name": "location", "$ref": "Debugger.Location", "description": "Location of console.profileEnd()." },
2107+ { "name": "profile", "$ref": "Profile" },
2108+ { "name": "title", "type": "string", "optional": true, "description": "Profile title passed as an argument to console.profile()." }
2109+ ]
2110+ }
2111+ ]
2112+ },
2113+ {
2114+ "domain": "HeapProfiler",
2115+ "dependencies": ["Runtime"],
2116+ "experimental": true,
2117+ "types": [
2118+ {
2119+ "id": "HeapSnapshotObjectId",
2120+ "type": "string",
2121+ "description": "Heap snapshot object id."
2122+ },
2123+ {
2124+ "id": "SamplingHeapProfileNode",
2125+ "type": "object",
2126+ "description": "Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.",
2127+ "properties": [
2128+ { "name": "callFrame", "$ref": "Runtime.CallFrame", "description": "Function location." },
2129+ { "name": "selfSize", "type": "number", "description": "Allocations size in bytes for the node excluding children." },
2130+ { "name": "children", "type": "array", "items": { "$ref": "SamplingHeapProfileNode" }, "description": "Child nodes." }
2131+ ]
2132+ },
2133+ {
2134+ "id": "SamplingHeapProfile",
2135+ "type": "object",
2136+ "description": "Profile.",
2137+ "properties": [
2138+ { "name": "head", "$ref": "SamplingHeapProfileNode" }
2139+ ]
2140+ }
2141+ ],
2142+ "commands": [
2143+ {
2144+ "name": "enable"
2145+ },
2146+ {
2147+ "name": "disable"
2148+ },
2149+ {
2150+ "name": "startTrackingHeapObjects",
2151+ "parameters": [
2152+ { "name": "trackAllocations", "type": "boolean", "optional": true }
2153+ ]
2154+ },
2155+ {
2156+ "name": "stopTrackingHeapObjects",
2157+ "parameters": [
2158+ { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped." }
2159+ ]
2160+ },
2161+ {
2162+ "name": "takeHeapSnapshot",
2163+ "parameters": [
2164+ { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken." }
2165+ ]
2166+ },
2167+ {
2168+ "name": "collectGarbage"
2169+ },
2170+ {
2171+ "name": "getObjectByHeapObjectId",
2172+ "parameters": [
2173+ { "name": "objectId", "$ref": "HeapSnapshotObjectId" },
2174+ { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }
2175+ ],
2176+ "returns": [
2177+ { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." }
2178+ ]
2179+ },
2180+ {
2181+ "name": "addInspectedHeapObject",
2182+ "parameters": [
2183+ { "name": "heapObjectId", "$ref": "HeapSnapshotObjectId", "description": "Heap snapshot object id to be accessible by means of $x command line API." }
2184+ ],
2185+ "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions)."
2186+ },
2187+ {
2188+ "name": "getHeapObjectId",
2189+ "parameters": [
2190+ { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to get heap object id for." }
2191+ ],
2192+ "returns": [
2193+ { "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjectId", "description": "Id of the heap snapshot object corresponding to the passed remote object id." }
2194+ ]
2195+ },
2196+ {
2197+ "name": "startSampling",
2198+ "parameters": [
2199+ { "name": "samplingInterval", "type": "number", "optional": true, "description": "Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes." }
2200+ ]
2201+ },
2202+ {
2203+ "name": "stopSampling",
2204+ "returns": [
2205+ { "name": "profile", "$ref": "SamplingHeapProfile", "description": "Recorded sampling heap profile." }
2206+ ]
2207+ },
2208+ {
2209+ "name": "getSamplingProfile",
2210+ "returns": [
2211+ { "name": "profile", "$ref": "SamplingHeapProfile", "description": "Return the sampling profile being collected." }
2212+ ]
2213+ }
2214+ ],
2215+ "events": [
2216+ {
2217+ "name": "addHeapSnapshotChunk",
2218+ "parameters": [
2219+ { "name": "chunk", "type": "string" }
2220+ ]
2221+ },
2222+ {
2223+ "name": "resetProfiles"
2224+ },
2225+ {
2226+ "name": "reportHeapSnapshotProgress",
2227+ "parameters": [
2228+ { "name": "done", "type": "integer" },
2229+ { "name": "total", "type": "integer" },
2230+ { "name": "finished", "type": "boolean", "optional": true }
2231+ ]
2232+ },
2233+ {
2234+ "name": "lastSeenObjectId",
2235+ "description": "If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.",
2236+ "parameters": [
2237+ { "name": "lastSeenObjectId", "type": "integer" },
2238+ { "name": "timestamp", "type": "number" }
2239+ ]
2240+ },
2241+ {
2242+ "name": "heapStatsUpdate",
2243+ "description": "If heap objects tracking has been started then backend may send update for one or more fragments",
2244+ "parameters": [
2245+ { "name": "statsUpdate", "type": "array", "items": { "type": "integer" }, "description": "An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment."}
2246+ ]
2247+ }
2248+ ]
2249+ }]
2250+}
2251diff --git a/deps/v8/include/js_protocol.pdl b/deps/v8/include/js_protocol.pdl
2252new file mode 100644
2253index 0000000000..c4ff51b060
2254--- /dev/null
2255+++ b/deps/v8/include/js_protocol.pdl
2256@@ -0,0 +1,1492 @@
2257+# Copyright 2017 The Chromium Authors. All rights reserved.
2258+# Use of this source code is governed by a BSD-style license that can be
2259+# found in the LICENSE file.
2260+
2261+version
2262+ major 1
2263+ minor 3
2264+
2265+# This domain is deprecated - use Runtime or Log instead.
2266+deprecated domain Console
2267+ depends on Runtime
2268+
2269+ # Console message.
2270+ type ConsoleMessage extends object
2271+ properties
2272+ # Message source.
2273+ enum source
2274+ xml
2275+ javascript
2276+ network
2277+ console-api
2278+ storage
2279+ appcache
2280+ rendering
2281+ security
2282+ other
2283+ deprecation
2284+ worker
2285+ # Message severity.
2286+ enum level
2287+ log
2288+ warning
2289+ error
2290+ debug
2291+ info
2292+ # Message text.
2293+ string text
2294+ # URL of the message origin.
2295+ optional string url
2296+ # Line number in the resource that generated this message (1-based).
2297+ optional integer line
2298+ # Column number in the resource that generated this message (1-based).
2299+ optional integer column
2300+
2301+ # Does nothing.
2302+ command clearMessages
2303+
2304+ # Disables console domain, prevents further console messages from being reported to the client.
2305+ command disable
2306+
2307+ # Enables console domain, sends the messages collected so far to the client by means of the
2308+ # `messageAdded` notification.
2309+ command enable
2310+
2311+ # Issued when new console message is added.
2312+ event messageAdded
2313+ parameters
2314+ # Console message that has been added.
2315+ ConsoleMessage message
2316+
2317+# Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing
2318+# breakpoints, stepping through execution, exploring stack traces, etc.
2319+domain Debugger
2320+ depends on Runtime
2321+
2322+ # Breakpoint identifier.
2323+ type BreakpointId extends string
2324+
2325+ # Call frame identifier.
2326+ type CallFrameId extends string
2327+
2328+ # Location in the source code.
2329+ type Location extends object
2330+ properties
2331+ # Script identifier as reported in the `Debugger.scriptParsed`.
2332+ Runtime.ScriptId scriptId
2333+ # Line number in the script (0-based).
2334+ integer lineNumber
2335+ # Column number in the script (0-based).
2336+ optional integer columnNumber
2337+
2338+ # Location in the source code.
2339+ experimental type ScriptPosition extends object
2340+ properties
2341+ integer lineNumber
2342+ integer columnNumber
2343+
2344+ # JavaScript call frame. Array of call frames form the call stack.
2345+ type CallFrame extends object
2346+ properties
2347+ # Call frame identifier. This identifier is only valid while the virtual machine is paused.
2348+ CallFrameId callFrameId
2349+ # Name of the JavaScript function called on this call frame.
2350+ string functionName
2351+ # Location in the source code.
2352+ optional Location functionLocation
2353+ # Location in the source code.
2354+ Location location
2355+ # JavaScript script name or url.
2356+ string url
2357+ # Scope chain for this call frame.
2358+ array of Scope scopeChain
2359+ # `this` object for this call frame.
2360+ Runtime.RemoteObject this
2361+ # The value being returned, if the function is at return point.
2362+ optional Runtime.RemoteObject returnValue
2363+
2364+ # Scope description.
2365+ type Scope extends object
2366+ properties
2367+ # Scope type.
2368+ enum type
2369+ global
2370+ local
2371+ with
2372+ closure
2373+ catch
2374+ block
2375+ script
2376+ eval
2377+ module
2378+ # Object representing the scope. For `global` and `with` scopes it represents the actual
2379+ # object; for the rest of the scopes, it is artificial transient object enumerating scope
2380+ # variables as its properties.
2381+ Runtime.RemoteObject object
2382+ optional string name
2383+ # Location in the source code where scope starts
2384+ optional Location startLocation
2385+ # Location in the source code where scope ends
2386+ optional Location endLocation
2387+
2388+ # Search match for resource.
2389+ type SearchMatch extends object
2390+ properties
2391+ # Line number in resource content.
2392+ number lineNumber
2393+ # Line with match content.
2394+ string lineContent
2395+
2396+ type BreakLocation extends object
2397+ properties
2398+ # Script identifier as reported in the `Debugger.scriptParsed`.
2399+ Runtime.ScriptId scriptId
2400+ # Line number in the script (0-based).
2401+ integer lineNumber
2402+ # Column number in the script (0-based).
2403+ optional integer columnNumber
2404+ optional enum type
2405+ debuggerStatement
2406+ call
2407+ return
2408+
2409+ # Continues execution until specific location is reached.
2410+ command continueToLocation
2411+ parameters
2412+ # Location to continue to.
2413+ Location location
2414+ optional enum targetCallFrames
2415+ any
2416+ current
2417+
2418+ # Disables debugger for given page.
2419+ command disable
2420+
2421+ # Enables debugger for the given page. Clients should not assume that the debugging has been
2422+ # enabled until the result for this command is received.
2423+ command enable
2424+ parameters
2425+ # The maximum size in bytes of collected scripts (not referenced by other heap objects)
2426+ # the debugger can hold. Puts no limit if paramter is omitted.
2427+ experimental optional number maxScriptsCacheSize
2428+ returns
2429+ # Unique identifier of the debugger.
2430+ experimental Runtime.UniqueDebuggerId debuggerId
2431+
2432+ # Evaluates expression on a given call frame.
2433+ command evaluateOnCallFrame
2434+ parameters
2435+ # Call frame identifier to evaluate on.
2436+ CallFrameId callFrameId
2437+ # Expression to evaluate.
2438+ string expression
2439+ # String object group name to put result into (allows rapid releasing resulting object handles
2440+ # using `releaseObjectGroup`).
2441+ optional string objectGroup
2442+ # Specifies whether command line API should be available to the evaluated expression, defaults
2443+ # to false.
2444+ optional boolean includeCommandLineAPI
2445+ # In silent mode exceptions thrown during evaluation are not reported and do not pause
2446+ # execution. Overrides `setPauseOnException` state.
2447+ optional boolean silent
2448+ # Whether the result is expected to be a JSON object that should be sent by value.
2449+ optional boolean returnByValue
2450+ # Whether preview should be generated for the result.
2451+ experimental optional boolean generatePreview
2452+ # Whether to throw an exception if side effect cannot be ruled out during evaluation.
2453+ optional boolean throwOnSideEffect
2454+ # Terminate execution after timing out (number of milliseconds).
2455+ experimental optional Runtime.TimeDelta timeout
2456+ returns
2457+ # Object wrapper for the evaluation result.
2458+ Runtime.RemoteObject result
2459+ # Exception details.
2460+ optional Runtime.ExceptionDetails exceptionDetails
2461+
2462+ # Returns possible locations for breakpoint. scriptId in start and end range locations should be
2463+ # the same.
2464+ command getPossibleBreakpoints
2465+ parameters
2466+ # Start of range to search possible breakpoint locations in.
2467+ Location start
2468+ # End of range to search possible breakpoint locations in (excluding). When not specified, end
2469+ # of scripts is used as end of range.
2470+ optional Location end
2471+ # Only consider locations which are in the same (non-nested) function as start.
2472+ optional boolean restrictToFunction
2473+ returns
2474+ # List of the possible breakpoint locations.
2475+ array of BreakLocation locations
2476+
2477+ # Returns source for the script with given id.
2478+ command getScriptSource
2479+ parameters
2480+ # Id of the script to get source for.
2481+ Runtime.ScriptId scriptId
2482+ returns
2483+ # Script source.
2484+ string scriptSource
2485+
2486+ # Returns stack trace with given `stackTraceId`.
2487+ experimental command getStackTrace
2488+ parameters
2489+ Runtime.StackTraceId stackTraceId
2490+ returns
2491+ Runtime.StackTrace stackTrace
2492+
2493+ # Stops on the next JavaScript statement.
2494+ command pause
2495+
2496+ experimental command pauseOnAsyncCall
2497+ parameters
2498+ # Debugger will pause when async call with given stack trace is started.
2499+ Runtime.StackTraceId parentStackTraceId
2500+
2501+ # Removes JavaScript breakpoint.
2502+ command removeBreakpoint
2503+ parameters
2504+ BreakpointId breakpointId
2505+
2506+ # Restarts particular call frame from the beginning.
2507+ command restartFrame
2508+ parameters
2509+ # Call frame identifier to evaluate on.
2510+ CallFrameId callFrameId
2511+ returns
2512+ # New stack trace.
2513+ array of CallFrame callFrames
2514+ # Async stack trace, if any.
2515+ optional Runtime.StackTrace asyncStackTrace
2516+ # Async stack trace, if any.
2517+ experimental optional Runtime.StackTraceId asyncStackTraceId
2518+
2519+ # Resumes JavaScript execution.
2520+ command resume
2521+
2522+ # Searches for given string in script content.
2523+ command searchInContent
2524+ parameters
2525+ # Id of the script to search in.
2526+ Runtime.ScriptId scriptId
2527+ # String to search for.
2528+ string query
2529+ # If true, search is case sensitive.
2530+ optional boolean caseSensitive
2531+ # If true, treats string parameter as regex.
2532+ optional boolean isRegex
2533+ returns
2534+ # List of search matches.
2535+ array of SearchMatch result
2536+
2537+ # Enables or disables async call stacks tracking.
2538+ command setAsyncCallStackDepth
2539+ parameters
2540+ # Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
2541+ # call stacks (default).
2542+ integer maxDepth
2543+
2544+ # Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
2545+ # scripts with url matching one of the patterns. VM will try to leave blackboxed script by
2546+ # performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
2547+ experimental command setBlackboxPatterns
2548+ parameters
2549+ # Array of regexps that will be used to check script url for blackbox state.
2550+ array of string patterns
2551+
2552+ # Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
2553+ # scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
2554+ # Positions array contains positions where blackbox state is changed. First interval isn't
2555+ # blackboxed. Array should be sorted.
2556+ experimental command setBlackboxedRanges
2557+ parameters
2558+ # Id of the script.
2559+ Runtime.ScriptId scriptId
2560+ array of ScriptPosition positions
2561+
2562+ # Sets JavaScript breakpoint at a given location.
2563+ command setBreakpoint
2564+ parameters
2565+ # Location to set breakpoint in.
2566+ Location location
2567+ # Expression to use as a breakpoint condition. When specified, debugger will only stop on the
2568+ # breakpoint if this expression evaluates to true.
2569+ optional string condition
2570+ returns
2571+ # Id of the created breakpoint for further reference.
2572+ BreakpointId breakpointId
2573+ # Location this breakpoint resolved into.
2574+ Location actualLocation
2575+
2576+ # Sets instrumentation breakpoint.
2577+ command setInstrumentationBreakpoint
2578+ parameters
2579+ # Instrumentation name.
2580+ enum instrumentation
2581+ beforeScriptExecution
2582+ beforeScriptWithSourceMapExecution
2583+ returns
2584+ # Id of the created breakpoint for further reference.
2585+ BreakpointId breakpointId
2586+
2587+ # Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
2588+ # command is issued, all existing parsed scripts will have breakpoints resolved and returned in
2589+ # `locations` property. Further matching script parsing will result in subsequent
2590+ # `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
2591+ command setBreakpointByUrl
2592+ parameters
2593+ # Line number to set breakpoint at.
2594+ integer lineNumber
2595+ # URL of the resources to set breakpoint on.
2596+ optional string url
2597+ # Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or
2598+ # `urlRegex` must be specified.
2599+ optional string urlRegex
2600+ # Script hash of the resources to set breakpoint on.
2601+ optional string scriptHash
2602+ # Offset in the line to set breakpoint at.
2603+ optional integer columnNumber
2604+ # Expression to use as a breakpoint condition. When specified, debugger will only stop on the
2605+ # breakpoint if this expression evaluates to true.
2606+ optional string condition
2607+ returns
2608+ # Id of the created breakpoint for further reference.
2609+ BreakpointId breakpointId
2610+ # List of the locations this breakpoint resolved into upon addition.
2611+ array of Location locations
2612+
2613+ # Sets JavaScript breakpoint before each call to the given function.
2614+ # If another function was created from the same source as a given one,
2615+ # calling it will also trigger the breakpoint.
2616+ experimental command setBreakpointOnFunctionCall
2617+ parameters
2618+ # Function object id.
2619+ Runtime.RemoteObjectId objectId
2620+ # Expression to use as a breakpoint condition. When specified, debugger will
2621+ # stop on the breakpoint if this expression evaluates to true.
2622+ optional string condition
2623+ returns
2624+ # Id of the created breakpoint for further reference.
2625+ BreakpointId breakpointId
2626+
2627+ # Activates / deactivates all breakpoints on the page.
2628+ command setBreakpointsActive
2629+ parameters
2630+ # New value for breakpoints active state.
2631+ boolean active
2632+
2633+ # Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or
2634+ # no exceptions. Initial pause on exceptions state is `none`.
2635+ command setPauseOnExceptions
2636+ parameters
2637+ # Pause on exceptions mode.
2638+ enum state
2639+ none
2640+ uncaught
2641+ all
2642+
2643+ # Changes return value in top frame. Available only at return break position.
2644+ experimental command setReturnValue
2645+ parameters
2646+ # New return value.
2647+ Runtime.CallArgument newValue
2648+
2649+ # Edits JavaScript source live.
2650+ command setScriptSource
2651+ parameters
2652+ # Id of the script to edit.
2653+ Runtime.ScriptId scriptId
2654+ # New content of the script.
2655+ string scriptSource
2656+ # If true the change will not actually be applied. Dry run may be used to get result
2657+ # description without actually modifying the code.
2658+ optional boolean dryRun
2659+ returns
2660+ # New stack trace in case editing has happened while VM was stopped.
2661+ optional array of CallFrame callFrames
2662+ # Whether current call stack was modified after applying the changes.
2663+ optional boolean stackChanged
2664+ # Async stack trace, if any.
2665+ optional Runtime.StackTrace asyncStackTrace
2666+ # Async stack trace, if any.
2667+ experimental optional Runtime.StackTraceId asyncStackTraceId
2668+ # Exception details if any.
2669+ optional Runtime.ExceptionDetails exceptionDetails
2670+
2671+ # Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
2672+ command setSkipAllPauses
2673+ parameters
2674+ # New value for skip pauses state.
2675+ boolean skip
2676+
2677+ # Changes value of variable in a callframe. Object-based scopes are not supported and must be
2678+ # mutated manually.
2679+ command setVariableValue
2680+ parameters
2681+ # 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'
2682+ # scope types are allowed. Other scopes could be manipulated manually.
2683+ integer scopeNumber
2684+ # Variable name.
2685+ string variableName
2686+ # New variable value.
2687+ Runtime.CallArgument newValue
2688+ # Id of callframe that holds variable.
2689+ CallFrameId callFrameId
2690+
2691+ # Steps into the function call.
2692+ command stepInto
2693+ parameters
2694+ # Debugger will issue additional Debugger.paused notification if any async task is scheduled
2695+ # before next pause.
2696+ experimental optional boolean breakOnAsyncCall
2697+
2698+ # Steps out of the function call.
2699+ command stepOut
2700+
2701+ # Steps over the statement.
2702+ command stepOver
2703+
2704+ # Fired when breakpoint is resolved to an actual script and location.
2705+ event breakpointResolved
2706+ parameters
2707+ # Breakpoint unique identifier.
2708+ BreakpointId breakpointId
2709+ # Actual breakpoint location.
2710+ Location location
2711+
2712+ # Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
2713+ event paused
2714+ parameters
2715+ # Call stack the virtual machine stopped on.
2716+ array of CallFrame callFrames
2717+ # Pause reason.
2718+ enum reason
2719+ ambiguous
2720+ assert
2721+ debugCommand
2722+ DOM
2723+ EventListener
2724+ exception
2725+ instrumentation
2726+ OOM
2727+ other
2728+ promiseRejection
2729+ XHR
2730+ # Object containing break-specific auxiliary properties.
2731+ optional object data
2732+ # Hit breakpoints IDs
2733+ optional array of string hitBreakpoints
2734+ # Async stack trace, if any.
2735+ optional Runtime.StackTrace asyncStackTrace
2736+ # Async stack trace, if any.
2737+ experimental optional Runtime.StackTraceId asyncStackTraceId
2738+ # Just scheduled async call will have this stack trace as parent stack during async execution.
2739+ # This field is available only after `Debugger.stepInto` call with `breakOnAsynCall` flag.
2740+ experimental optional Runtime.StackTraceId asyncCallStackTraceId
2741+
2742+ # Fired when the virtual machine resumed execution.
2743+ event resumed
2744+
2745+ # Fired when virtual machine fails to parse the script.
2746+ event scriptFailedToParse
2747+ parameters
2748+ # Identifier of the script parsed.
2749+ Runtime.ScriptId scriptId
2750+ # URL or name of the script parsed (if any).
2751+ string url
2752+ # Line offset of the script within the resource with given URL (for script tags).
2753+ integer startLine
2754+ # Column offset of the script within the resource with given URL.
2755+ integer startColumn
2756+ # Last line of the script.
2757+ integer endLine
2758+ # Length of the last line of the script.
2759+ integer endColumn
2760+ # Specifies script creation context.
2761+ Runtime.ExecutionContextId executionContextId
2762+ # Content hash of the script.
2763+ string hash
2764+ # Embedder-specific auxiliary data.
2765+ optional object executionContextAuxData
2766+ # URL of source map associated with script (if any).
2767+ optional string sourceMapURL
2768+ # True, if this script has sourceURL.
2769+ optional boolean hasSourceURL
2770+ # True, if this script is ES6 module.
2771+ optional boolean isModule
2772+ # This script length.
2773+ optional integer length
2774+ # JavaScript top stack frame of where the script parsed event was triggered if available.
2775+ experimental optional Runtime.StackTrace stackTrace
2776+
2777+ # Fired when virtual machine parses script. This event is also fired for all known and uncollected
2778+ # scripts upon enabling debugger.
2779+ event scriptParsed
2780+ parameters
2781+ # Identifier of the script parsed.
2782+ Runtime.ScriptId scriptId
2783+ # URL or name of the script parsed (if any).
2784+ string url
2785+ # Line offset of the script within the resource with given URL (for script tags).
2786+ integer startLine
2787+ # Column offset of the script within the resource with given URL.
2788+ integer startColumn
2789+ # Last line of the script.
2790+ integer endLine
2791+ # Length of the last line of the script.
2792+ integer endColumn
2793+ # Specifies script creation context.
2794+ Runtime.ExecutionContextId executionContextId
2795+ # Content hash of the script.
2796+ string hash
2797+ # Embedder-specific auxiliary data.
2798+ optional object executionContextAuxData
2799+ # True, if this script is generated as a result of the live edit operation.
2800+ experimental optional boolean isLiveEdit
2801+ # URL of source map associated with script (if any).
2802+ optional string sourceMapURL
2803+ # True, if this script has sourceURL.
2804+ optional boolean hasSourceURL
2805+ # True, if this script is ES6 module.
2806+ optional boolean isModule
2807+ # This script length.
2808+ optional integer length
2809+ # JavaScript top stack frame of where the script parsed event was triggered if available.
2810+ experimental optional Runtime.StackTrace stackTrace
2811+
2812+experimental domain HeapProfiler
2813+ depends on Runtime
2814+
2815+ # Heap snapshot object id.
2816+ type HeapSnapshotObjectId extends string
2817+
2818+ # Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
2819+ type SamplingHeapProfileNode extends object
2820+ properties
2821+ # Function location.
2822+ Runtime.CallFrame callFrame
2823+ # Allocations size in bytes for the node excluding children.
2824+ number selfSize
2825+ # Node id. Ids are unique across all profiles collected between startSampling and stopSampling.
2826+ integer id
2827+ # Child nodes.
2828+ array of SamplingHeapProfileNode children
2829+
2830+ # A single sample from a sampling profile.
2831+ type SamplingHeapProfileSample extends object
2832+ properties
2833+ # Allocation size in bytes attributed to the sample.
2834+ number size
2835+ # Id of the corresponding profile tree node.
2836+ integer nodeId
2837+ # Time-ordered sample ordinal number. It is unique across all profiles retrieved
2838+ # between startSampling and stopSampling.
2839+ number ordinal
2840+
2841+ # Sampling profile.
2842+ type SamplingHeapProfile extends object
2843+ properties
2844+ SamplingHeapProfileNode head
2845+ array of SamplingHeapProfileSample samples
2846+
2847+ # Enables console to refer to the node with given id via $x (see Command Line API for more details
2848+ # $x functions).
2849+ command addInspectedHeapObject
2850+ parameters
2851+ # Heap snapshot object id to be accessible by means of $x command line API.
2852+ HeapSnapshotObjectId heapObjectId
2853+
2854+ command collectGarbage
2855+
2856+ command disable
2857+
2858+ command enable
2859+
2860+ command getHeapObjectId
2861+ parameters
2862+ # Identifier of the object to get heap object id for.
2863+ Runtime.RemoteObjectId objectId
2864+ returns
2865+ # Id of the heap snapshot object corresponding to the passed remote object id.
2866+ HeapSnapshotObjectId heapSnapshotObjectId
2867+
2868+ command getObjectByHeapObjectId
2869+ parameters
2870+ HeapSnapshotObjectId objectId
2871+ # Symbolic group name that can be used to release multiple objects.
2872+ optional string objectGroup
2873+ returns
2874+ # Evaluation result.
2875+ Runtime.RemoteObject result
2876+
2877+ command getSamplingProfile
2878+ returns
2879+ # Return the sampling profile being collected.
2880+ SamplingHeapProfile profile
2881+
2882+ command startSampling
2883+ parameters
2884+ # Average sample interval in bytes. Poisson distribution is used for the intervals. The
2885+ # default value is 32768 bytes.
2886+ optional number samplingInterval
2887+
2888+ command startTrackingHeapObjects
2889+ parameters
2890+ optional boolean trackAllocations
2891+
2892+ command stopSampling
2893+ returns
2894+ # Recorded sampling heap profile.
2895+ SamplingHeapProfile profile
2896+
2897+ command stopTrackingHeapObjects
2898+ parameters
2899+ # If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken
2900+ # when the tracking is stopped.
2901+ optional boolean reportProgress
2902+
2903+ command takeHeapSnapshot
2904+ parameters
2905+ # If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
2906+ optional boolean reportProgress
2907+
2908+ event addHeapSnapshotChunk
2909+ parameters
2910+ string chunk
2911+
2912+ # If heap objects tracking has been started then backend may send update for one or more fragments
2913+ event heapStatsUpdate
2914+ parameters
2915+ # An array of triplets. Each triplet describes a fragment. The first integer is the fragment
2916+ # index, the second integer is a total count of objects for the fragment, the third integer is
2917+ # a total size of the objects for the fragment.
2918+ array of integer statsUpdate
2919+
2920+ # If heap objects tracking has been started then backend regularly sends a current value for last
2921+ # seen object id and corresponding timestamp. If the were changes in the heap since last event
2922+ # then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
2923+ event lastSeenObjectId
2924+ parameters
2925+ integer lastSeenObjectId
2926+ number timestamp
2927+
2928+ event reportHeapSnapshotProgress
2929+ parameters
2930+ integer done
2931+ integer total
2932+ optional boolean finished
2933+
2934+ event resetProfiles
2935+
2936+domain Profiler
2937+ depends on Runtime
2938+ depends on Debugger
2939+
2940+ # Profile node. Holds callsite information, execution statistics and child nodes.
2941+ type ProfileNode extends object
2942+ properties
2943+ # Unique id of the node.
2944+ integer id
2945+ # Function location.
2946+ Runtime.CallFrame callFrame
2947+ # Number of samples where this node was on top of the call stack.
2948+ optional integer hitCount
2949+ # Child node ids.
2950+ optional array of integer children
2951+ # The reason of being not optimized. The function may be deoptimized or marked as don't
2952+ # optimize.
2953+ optional string deoptReason
2954+ # An array of source position ticks.
2955+ optional array of PositionTickInfo positionTicks
2956+
2957+ # Profile.
2958+ type Profile extends object
2959+ properties
2960+ # The list of profile nodes. First item is the root node.
2961+ array of ProfileNode nodes
2962+ # Profiling start timestamp in microseconds.
2963+ number startTime
2964+ # Profiling end timestamp in microseconds.
2965+ number endTime
2966+ # Ids of samples top nodes.
2967+ optional array of integer samples
2968+ # Time intervals between adjacent samples in microseconds. The first delta is relative to the
2969+ # profile startTime.
2970+ optional array of integer timeDeltas
2971+
2972+ # Specifies a number of samples attributed to a certain source position.
2973+ type PositionTickInfo extends object
2974+ properties
2975+ # Source line number (1-based).
2976+ integer line
2977+ # Number of samples attributed to the source line.
2978+ integer ticks
2979+
2980+ # Coverage data for a source range.
2981+ type CoverageRange extends object
2982+ properties
2983+ # JavaScript script source offset for the range start.
2984+ integer startOffset
2985+ # JavaScript script source offset for the range end.
2986+ integer endOffset
2987+ # Collected execution count of the source range.
2988+ integer count
2989+
2990+ # Coverage data for a JavaScript function.
2991+ type FunctionCoverage extends object
2992+ properties
2993+ # JavaScript function name.
2994+ string functionName
2995+ # Source ranges inside the function with coverage data.
2996+ array of CoverageRange ranges
2997+ # Whether coverage data for this function has block granularity.
2998+ boolean isBlockCoverage
2999+
3000+ # Coverage data for a JavaScript script.
3001+ type ScriptCoverage extends object
3002+ properties
3003+ # JavaScript script id.
3004+ Runtime.ScriptId scriptId
3005+ # JavaScript script name or url.
3006+ string url
3007+ # Functions contained in the script that has coverage data.
3008+ array of FunctionCoverage functions
3009+
3010+ # Describes a type collected during runtime.
3011+ experimental type TypeObject extends object
3012+ properties
3013+ # Name of a type collected with type profiling.
3014+ string name
3015+
3016+ # Source offset and types for a parameter or return value.
3017+ experimental type TypeProfileEntry extends object
3018+ properties
3019+ # Source offset of the parameter or end of function for return values.
3020+ integer offset
3021+ # The types for this parameter or return value.
3022+ array of TypeObject types
3023+
3024+ # Type profile data collected during runtime for a JavaScript script.
3025+ experimental type ScriptTypeProfile extends object
3026+ properties
3027+ # JavaScript script id.
3028+ Runtime.ScriptId scriptId
3029+ # JavaScript script name or url.
3030+ string url
3031+ # Type profile entries for parameters and return values of the functions in the script.
3032+ array of TypeProfileEntry entries
3033+
3034+ command disable
3035+
3036+ command enable
3037+
3038+ # Collect coverage data for the current isolate. The coverage data may be incomplete due to
3039+ # garbage collection.
3040+ command getBestEffortCoverage
3041+ returns
3042+ # Coverage data for the current isolate.
3043+ array of ScriptCoverage result
3044+
3045+ # Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
3046+ command setSamplingInterval
3047+ parameters
3048+ # New sampling interval in microseconds.
3049+ integer interval
3050+
3051+ command start
3052+
3053+ # Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
3054+ # coverage may be incomplete. Enabling prevents running optimized code and resets execution
3055+ # counters.
3056+ command startPreciseCoverage
3057+ parameters
3058+ # Collect accurate call counts beyond simple 'covered' or 'not covered'.
3059+ optional boolean callCount
3060+ # Collect block-based coverage.
3061+ optional boolean detailed
3062+
3063+ # Enable type profile.
3064+ experimental command startTypeProfile
3065+
3066+ command stop
3067+ returns
3068+ # Recorded profile.
3069+ Profile profile
3070+
3071+ # Disable precise code coverage. Disabling releases unnecessary execution count records and allows
3072+ # executing optimized code.
3073+ command stopPreciseCoverage
3074+
3075+ # Disable type profile. Disabling releases type profile data collected so far.
3076+ experimental command stopTypeProfile
3077+
3078+ # Collect coverage data for the current isolate, and resets execution counters. Precise code
3079+ # coverage needs to have started.
3080+ command takePreciseCoverage
3081+ returns
3082+ # Coverage data for the current isolate.
3083+ array of ScriptCoverage result
3084+
3085+ # Collect type profile.
3086+ experimental command takeTypeProfile
3087+ returns
3088+ # Type profile for all scripts since startTypeProfile() was turned on.
3089+ array of ScriptTypeProfile result
3090+
3091+ event consoleProfileFinished
3092+ parameters
3093+ string id
3094+ # Location of console.profileEnd().
3095+ Debugger.Location location
3096+ Profile profile
3097+ # Profile title passed as an argument to console.profile().
3098+ optional string title
3099+
3100+ # Sent when new profile recording is started using console.profile() call.
3101+ event consoleProfileStarted
3102+ parameters
3103+ string id
3104+ # Location of console.profile().
3105+ Debugger.Location location
3106+ # Profile title passed as an argument to console.profile().
3107+ optional string title
3108+
3109+# Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects.
3110+# Evaluation results are returned as mirror object that expose object type, string representation
3111+# and unique identifier that can be used for further object reference. Original objects are
3112+# maintained in memory unless they are either explicitly released or are released along with the
3113+# other objects in their object group.
3114+domain Runtime
3115+
3116+ # Unique script identifier.
3117+ type ScriptId extends string
3118+
3119+ # Unique object identifier.
3120+ type RemoteObjectId extends string
3121+
3122+ # Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`,
3123+ # `-Infinity`, and bigint literals.
3124+ type UnserializableValue extends string
3125+
3126+ # Mirror object referencing original JavaScript object.
3127+ type RemoteObject extends object
3128+ properties
3129+ # Object type.
3130+ enum type
3131+ object
3132+ function
3133+ undefined
3134+ string
3135+ number
3136+ boolean
3137+ symbol
3138+ bigint
3139+ # Object subtype hint. Specified for `object` type values only.
3140+ optional enum subtype
3141+ array
3142+ null
3143+ node
3144+ regexp
3145+ date
3146+ map
3147+ set
3148+ weakmap
3149+ weakset
3150+ iterator
3151+ generator
3152+ error
3153+ proxy
3154+ promise
3155+ typedarray
3156+ arraybuffer
3157+ dataview
3158+ # Object class (constructor) name. Specified for `object` type values only.
3159+ optional string className
3160+ # Remote object value in case of primitive values or JSON values (if it was requested).
3161+ optional any value
3162+ # Primitive value which can not be JSON-stringified does not have `value`, but gets this
3163+ # property.
3164+ optional UnserializableValue unserializableValue
3165+ # String representation of the object.
3166+ optional string description
3167+ # Unique object identifier (for non-primitive values).
3168+ optional RemoteObjectId objectId
3169+ # Preview containing abbreviated property values. Specified for `object` type values only.
3170+ experimental optional ObjectPreview preview
3171+ experimental optional CustomPreview customPreview
3172+
3173+ experimental type CustomPreview extends object
3174+ properties
3175+ # The JSON-stringified result of formatter.header(object, config) call.
3176+ # It contains json ML array that represents RemoteObject.
3177+ string header
3178+ # If formatter returns true as a result of formatter.hasBody call then bodyGetterId will
3179+ # contain RemoteObjectId for the function that returns result of formatter.body(object, config) call.
3180+ # The result value is json ML array.
3181+ optional RemoteObjectId bodyGetterId
3182+
3183+ # Object containing abbreviated remote object value.
3184+ experimental type ObjectPreview extends object
3185+ properties
3186+ # Object type.
3187+ enum type
3188+ object
3189+ function
3190+ undefined
3191+ string
3192+ number
3193+ boolean
3194+ symbol
3195+ bigint
3196+ # Object subtype hint. Specified for `object` type values only.
3197+ optional enum subtype
3198+ array
3199+ null
3200+ node
3201+ regexp
3202+ date
3203+ map
3204+ set
3205+ weakmap
3206+ weakset
3207+ iterator
3208+ generator
3209+ error
3210+ # String representation of the object.
3211+ optional string description
3212+ # True iff some of the properties or entries of the original object did not fit.
3213+ boolean overflow
3214+ # List of the properties.
3215+ array of PropertyPreview properties
3216+ # List of the entries. Specified for `map` and `set` subtype values only.
3217+ optional array of EntryPreview entries
3218+
3219+ experimental type PropertyPreview extends object
3220+ properties
3221+ # Property name.
3222+ string name
3223+ # Object type. Accessor means that the property itself is an accessor property.
3224+ enum type
3225+ object
3226+ function
3227+ undefined
3228+ string
3229+ number
3230+ boolean
3231+ symbol
3232+ accessor
3233+ bigint
3234+ # User-friendly property value string.
3235+ optional string value
3236+ # Nested value preview.
3237+ optional ObjectPreview valuePreview
3238+ # Object subtype hint. Specified for `object` type values only.
3239+ optional enum subtype
3240+ array
3241+ null
3242+ node
3243+ regexp
3244+ date
3245+ map
3246+ set
3247+ weakmap
3248+ weakset
3249+ iterator
3250+ generator
3251+ error
3252+
3253+ experimental type EntryPreview extends object
3254+ properties
3255+ # Preview of the key. Specified for map-like collection entries.
3256+ optional ObjectPreview key
3257+ # Preview of the value.
3258+ ObjectPreview value
3259+
3260+ # Object property descriptor.
3261+ type PropertyDescriptor extends object
3262+ properties
3263+ # Property name or symbol description.
3264+ string name
3265+ # The value associated with the property.
3266+ optional RemoteObject value
3267+ # True if the value associated with the property may be changed (data descriptors only).
3268+ optional boolean writable
3269+ # A function which serves as a getter for the property, or `undefined` if there is no getter
3270+ # (accessor descriptors only).
3271+ optional RemoteObject get
3272+ # A function which serves as a setter for the property, or `undefined` if there is no setter
3273+ # (accessor descriptors only).
3274+ optional RemoteObject set
3275+ # True if the type of this property descriptor may be changed and if the property may be
3276+ # deleted from the corresponding object.
3277+ boolean configurable
3278+ # True if this property shows up during enumeration of the properties on the corresponding
3279+ # object.
3280+ boolean enumerable
3281+ # True if the result was thrown during the evaluation.
3282+ optional boolean wasThrown
3283+ # True if the property is owned for the object.
3284+ optional boolean isOwn
3285+ # Property symbol object, if the property is of the `symbol` type.
3286+ optional RemoteObject symbol
3287+
3288+ # Object internal property descriptor. This property isn't normally visible in JavaScript code.
3289+ type InternalPropertyDescriptor extends object
3290+ properties
3291+ # Conventional property name.
3292+ string name
3293+ # The value associated with the property.
3294+ optional RemoteObject value
3295+
3296+ # Object private field descriptor.
3297+ experimental type PrivatePropertyDescriptor extends object
3298+ properties
3299+ # Private property name.
3300+ string name
3301+ # The value associated with the private property.
3302+ RemoteObject value
3303+
3304+ # Represents function call argument. Either remote object id `objectId`, primitive `value`,
3305+ # unserializable primitive value or neither of (for undefined) them should be specified.
3306+ type CallArgument extends object
3307+ properties
3308+ # Primitive value or serializable javascript object.
3309+ optional any value
3310+ # Primitive value which can not be JSON-stringified.
3311+ optional UnserializableValue unserializableValue
3312+ # Remote object handle.
3313+ optional RemoteObjectId objectId
3314+
3315+ # Id of an execution context.
3316+ type ExecutionContextId extends integer
3317+
3318+ # Description of an isolated world.
3319+ type ExecutionContextDescription extends object
3320+ properties
3321+ # Unique id of the execution context. It can be used to specify in which execution context
3322+ # script evaluation should be performed.
3323+ ExecutionContextId id
3324+ # Execution context origin.
3325+ string origin
3326+ # Human readable name describing given context.
3327+ string name
3328+ # Embedder-specific auxiliary data.
3329+ optional object auxData
3330+
3331+ # Detailed information about exception (or error) that was thrown during script compilation or
3332+ # execution.
3333+ type ExceptionDetails extends object
3334+ properties
3335+ # Exception id.
3336+ integer exceptionId
3337+ # Exception text, which should be used together with exception object when available.
3338+ string text
3339+ # Line number of the exception location (0-based).
3340+ integer lineNumber
3341+ # Column number of the exception location (0-based).
3342+ integer columnNumber
3343+ # Script ID of the exception location.
3344+ optional ScriptId scriptId
3345+ # URL of the exception location, to be used when the script was not reported.
3346+ optional string url
3347+ # JavaScript stack trace if available.
3348+ optional StackTrace stackTrace
3349+ # Exception object if available.
3350+ optional RemoteObject exception
3351+ # Identifier of the context where exception happened.
3352+ optional ExecutionContextId executionContextId
3353+
3354+ # Number of milliseconds since epoch.
3355+ type Timestamp extends number
3356+
3357+ # Number of milliseconds.
3358+ type TimeDelta extends number
3359+
3360+ # Stack entry for runtime errors and assertions.
3361+ type CallFrame extends object
3362+ properties
3363+ # JavaScript function name.
3364+ string functionName
3365+ # JavaScript script id.
3366+ ScriptId scriptId
3367+ # JavaScript script name or url.
3368+ string url
3369+ # JavaScript script line number (0-based).
3370+ integer lineNumber
3371+ # JavaScript script column number (0-based).
3372+ integer columnNumber
3373+
3374+ # Call frames for assertions or error messages.
3375+ type StackTrace extends object
3376+ properties
3377+ # String label of this stack trace. For async traces this may be a name of the function that
3378+ # initiated the async call.
3379+ optional string description
3380+ # JavaScript function name.
3381+ array of CallFrame callFrames
3382+ # Asynchronous JavaScript stack trace that preceded this stack, if available.
3383+ optional StackTrace parent
3384+ # Asynchronous JavaScript stack trace that preceded this stack, if available.
3385+ experimental optional StackTraceId parentId
3386+
3387+ # Unique identifier of current debugger.
3388+ experimental type UniqueDebuggerId extends string
3389+
3390+ # If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This
3391+ # allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages.
3392+ experimental type StackTraceId extends object
3393+ properties
3394+ string id
3395+ optional UniqueDebuggerId debuggerId
3396+
3397+ # Add handler to promise with given promise object id.
3398+ command awaitPromise
3399+ parameters
3400+ # Identifier of the promise.
3401+ RemoteObjectId promiseObjectId
3402+ # Whether the result is expected to be a JSON object that should be sent by value.
3403+ optional boolean returnByValue
3404+ # Whether preview should be generated for the result.
3405+ optional boolean generatePreview
3406+ returns
3407+ # Promise result. Will contain rejected value if promise was rejected.
3408+ RemoteObject result
3409+ # Exception details if stack strace is available.
3410+ optional ExceptionDetails exceptionDetails
3411+
3412+ # Calls function with given declaration on the given object. Object group of the result is
3413+ # inherited from the target object.
3414+ command callFunctionOn
3415+ parameters
3416+ # Declaration of the function to call.
3417+ string functionDeclaration
3418+ # Identifier of the object to call function on. Either objectId or executionContextId should
3419+ # be specified.
3420+ optional RemoteObjectId objectId
3421+ # Call arguments. All call arguments must belong to the same JavaScript world as the target
3422+ # object.
3423+ optional array of CallArgument arguments
3424+ # In silent mode exceptions thrown during evaluation are not reported and do not pause
3425+ # execution. Overrides `setPauseOnException` state.
3426+ optional boolean silent
3427+ # Whether the result is expected to be a JSON object which should be sent by value.
3428+ optional boolean returnByValue
3429+ # Whether preview should be generated for the result.
3430+ experimental optional boolean generatePreview
3431+ # Whether execution should be treated as initiated by user in the UI.
3432+ optional boolean userGesture
3433+ # Whether execution should `await` for resulting value and return once awaited promise is
3434+ # resolved.
3435+ optional boolean awaitPromise
3436+ # Specifies execution context which global object will be used to call function on. Either
3437+ # executionContextId or objectId should be specified.
3438+ optional ExecutionContextId executionContextId
3439+ # Symbolic group name that can be used to release multiple objects. If objectGroup is not
3440+ # specified and objectId is, objectGroup will be inherited from object.
3441+ optional string objectGroup
3442+ returns
3443+ # Call result.
3444+ RemoteObject result
3445+ # Exception details.
3446+ optional ExceptionDetails exceptionDetails
3447+
3448+ # Compiles expression.
3449+ command compileScript
3450+ parameters
3451+ # Expression to compile.
3452+ string expression
3453+ # Source url to be set for the script.
3454+ string sourceURL
3455+ # Specifies whether the compiled script should be persisted.
3456+ boolean persistScript
3457+ # Specifies in which execution context to perform script run. If the parameter is omitted the
3458+ # evaluation will be performed in the context of the inspected page.
3459+ optional ExecutionContextId executionContextId
3460+ returns
3461+ # Id of the script.
3462+ optional ScriptId scriptId
3463+ # Exception details.
3464+ optional ExceptionDetails exceptionDetails
3465+
3466+ # Disables reporting of execution contexts creation.
3467+ command disable
3468+
3469+ # Discards collected exceptions and console API calls.
3470+ command discardConsoleEntries
3471+
3472+ # Enables reporting of execution contexts creation by means of `executionContextCreated` event.
3473+ # When the reporting gets enabled the event will be sent immediately for each existing execution
3474+ # context.
3475+ command enable
3476+
3477+ # Evaluates expression on global object.
3478+ command evaluate
3479+ parameters
3480+ # Expression to evaluate.
3481+ string expression
3482+ # Symbolic group name that can be used to release multiple objects.
3483+ optional string objectGroup
3484+ # Determines whether Command Line API should be available during the evaluation.
3485+ optional boolean includeCommandLineAPI
3486+ # In silent mode exceptions thrown during evaluation are not reported and do not pause
3487+ # execution. Overrides `setPauseOnException` state.
3488+ optional boolean silent
3489+ # Specifies in which execution context to perform evaluation. If the parameter is omitted the
3490+ # evaluation will be performed in the context of the inspected page.
3491+ optional ExecutionContextId contextId
3492+ # Whether the result is expected to be a JSON object that should be sent by value.
3493+ optional boolean returnByValue
3494+ # Whether preview should be generated for the result.
3495+ experimental optional boolean generatePreview
3496+ # Whether execution should be treated as initiated by user in the UI.
3497+ optional boolean userGesture
3498+ # Whether execution should `await` for resulting value and return once awaited promise is
3499+ # resolved.
3500+ optional boolean awaitPromise
3501+ # Whether to throw an exception if side effect cannot be ruled out during evaluation.
3502+ experimental optional boolean throwOnSideEffect
3503+ # Terminate execution after timing out (number of milliseconds).
3504+ experimental optional TimeDelta timeout
3505+ returns
3506+ # Evaluation result.
3507+ RemoteObject result
3508+ # Exception details.
3509+ optional ExceptionDetails exceptionDetails
3510+
3511+ # Returns the isolate id.
3512+ experimental command getIsolateId
3513+ returns
3514+ # The isolate id.
3515+ string id
3516+
3517+ # Returns the JavaScript heap usage.
3518+ # It is the total usage of the corresponding isolate not scoped to a particular Runtime.
3519+ experimental command getHeapUsage
3520+ returns
3521+ # Used heap size in bytes.
3522+ number usedSize
3523+ # Allocated heap size in bytes.
3524+ number totalSize
3525+
3526+ # Returns properties of a given object. Object group of the result is inherited from the target
3527+ # object.
3528+ command getProperties
3529+ parameters
3530+ # Identifier of the object to return properties for.
3531+ RemoteObjectId objectId
3532+ # If true, returns properties belonging only to the element itself, not to its prototype
3533+ # chain.
3534+ optional boolean ownProperties
3535+ # If true, returns accessor properties (with getter/setter) only; internal properties are not
3536+ # returned either.
3537+ experimental optional boolean accessorPropertiesOnly
3538+ # Whether preview should be generated for the results.
3539+ experimental optional boolean generatePreview
3540+ returns
3541+ # Object properties.
3542+ array of PropertyDescriptor result
3543+ # Internal object properties (only of the element itself).
3544+ optional array of InternalPropertyDescriptor internalProperties
3545+ # Object private properties.
3546+ experimental optional array of PrivatePropertyDescriptor privateProperties
3547+ # Exception details.
3548+ optional ExceptionDetails exceptionDetails
3549+
3550+ # Returns all let, const and class variables from global scope.
3551+ command globalLexicalScopeNames
3552+ parameters
3553+ # Specifies in which execution context to lookup global scope variables.
3554+ optional ExecutionContextId executionContextId
3555+ returns
3556+ array of string names
3557+
3558+ command queryObjects
3559+ parameters
3560+ # Identifier of the prototype to return objects for.
3561+ RemoteObjectId prototypeObjectId
3562+ # Symbolic group name that can be used to release the results.
3563+ optional string objectGroup
3564+ returns
3565+ # Array with objects.
3566+ RemoteObject objects
3567+
3568+ # Releases remote object with given id.
3569+ command releaseObject
3570+ parameters
3571+ # Identifier of the object to release.
3572+ RemoteObjectId objectId
3573+
3574+ # Releases all remote objects that belong to a given group.
3575+ command releaseObjectGroup
3576+ parameters
3577+ # Symbolic object group name.
3578+ string objectGroup
3579+
3580+ # Tells inspected instance to run if it was waiting for debugger to attach.
3581+ command runIfWaitingForDebugger
3582+
3583+ # Runs script with given id in a given context.
3584+ command runScript
3585+ parameters
3586+ # Id of the script to run.
3587+ ScriptId scriptId
3588+ # Specifies in which execution context to perform script run. If the parameter is omitted the
3589+ # evaluation will be performed in the context of the inspected page.
3590+ optional ExecutionContextId executionContextId
3591+ # Symbolic group name that can be used to release multiple objects.
3592+ optional string objectGroup
3593+ # In silent mode exceptions thrown during evaluation are not reported and do not pause
3594+ # execution. Overrides `setPauseOnException` state.
3595+ optional boolean silent
3596+ # Determines whether Command Line API should be available during the evaluation.
3597+ optional boolean includeCommandLineAPI
3598+ # Whether the result is expected to be a JSON object which should be sent by value.
3599+ optional boolean returnByValue
3600+ # Whether preview should be generated for the result.
3601+ optional boolean generatePreview
3602+ # Whether execution should `await` for resulting value and return once awaited promise is
3603+ # resolved.
3604+ optional boolean awaitPromise
3605+ returns
3606+ # Run result.
3607+ RemoteObject result
3608+ # Exception details.
3609+ optional ExceptionDetails exceptionDetails
3610+
3611+ # Enables or disables async call stacks tracking.
3612+ command setAsyncCallStackDepth
3613+ redirect Debugger
3614+ parameters
3615+ # Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
3616+ # call stacks (default).
3617+ integer maxDepth
3618+
3619+ experimental command setCustomObjectFormatterEnabled
3620+ parameters
3621+ boolean enabled
3622+
3623+ experimental command setMaxCallStackSizeToCapture
3624+ parameters
3625+ integer size
3626+
3627+ # Terminate current or next JavaScript execution.
3628+ # Will cancel the termination when the outer-most script execution ends.
3629+ experimental command terminateExecution
3630+
3631+ # If executionContextId is empty, adds binding with the given name on the
3632+ # global objects of all inspected contexts, including those created later,
3633+ # bindings survive reloads.
3634+ # If executionContextId is specified, adds binding only on global object of
3635+ # given execution context.
3636+ # Binding function takes exactly one argument, this argument should be string,
3637+ # in case of any other input, function throws an exception.
3638+ # Each binding function call produces Runtime.bindingCalled notification.
3639+ experimental command addBinding
3640+ parameters
3641+ string name
3642+ optional ExecutionContextId executionContextId
3643+
3644+ # This method does not remove binding function from global object but
3645+ # unsubscribes current runtime agent from Runtime.bindingCalled notifications.
3646+ experimental command removeBinding
3647+ parameters
3648+ string name
3649+
3650+ # Notification is issued every time when binding is called.
3651+ experimental event bindingCalled
3652+ parameters
3653+ string name
3654+ string payload
3655+ # Identifier of the context where the call was made.
3656+ ExecutionContextId executionContextId
3657+
3658+ # Issued when console API was called.
3659+ event consoleAPICalled
3660+ parameters
3661+ # Type of the call.
3662+ enum type
3663+ log
3664+ debug
3665+ info
3666+ error
3667+ warning
3668+ dir
3669+ dirxml
3670+ table
3671+ trace
3672+ clear
3673+ startGroup
3674+ startGroupCollapsed
3675+ endGroup
3676+ assert
3677+ profile
3678+ profileEnd
3679+ count
3680+ timeEnd
3681+ # Call arguments.
3682+ array of RemoteObject args
3683+ # Identifier of the context where the call was made.
3684+ ExecutionContextId executionContextId
3685+ # Call timestamp.
3686+ Timestamp timestamp
3687+ # Stack trace captured when the call was made. The async stack chain is automatically reported for
3688+ # the following call types: `assert`, `error`, `trace`, `warning`. For other types the async call
3689+ # chain can be retrieved using `Debugger.getStackTrace` and `stackTrace.parentId` field.
3690+ optional StackTrace stackTrace
3691+ # Console context descriptor for calls on non-default console context (not console.*):
3692+ # 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call
3693+ # on named context.
3694+ experimental optional string context
3695+
3696+ # Issued when unhandled exception was revoked.
3697+ event exceptionRevoked
3698+ parameters
3699+ # Reason describing why exception was revoked.
3700+ string reason
3701+ # The id of revoked exception, as reported in `exceptionThrown`.
3702+ integer exceptionId
3703+
3704+ # Issued when exception was thrown and unhandled.
3705+ event exceptionThrown
3706+ parameters
3707+ # Timestamp of the exception.
3708+ Timestamp timestamp
3709+ ExceptionDetails exceptionDetails
3710+
3711+ # Issued when new execution context is created.
3712+ event executionContextCreated
3713+ parameters
3714+ # A newly created execution context.
3715+ ExecutionContextDescription context
3716+
3717+ # Issued when execution context is destroyed.
3718+ event executionContextDestroyed
3719+ parameters
3720+ # Id of the destroyed context
3721+ ExecutionContextId executionContextId
3722+
3723+ # Issued when all executionContexts were cleared in browser
3724+ event executionContextsCleared
3725+
3726+ # Issued when object should be inspected (for example, as a result of inspect() command line API
3727+ # call).
3728+ event inspectRequested
3729+ parameters
3730+ RemoteObject object
3731+ object hints
3732+
3733+# This domain is deprecated.
3734+deprecated domain Schema
3735+
3736+ # Description of the protocol domain.
3737+ type Domain extends object
3738+ properties
3739+ # Domain name.
3740+ string name
3741+ # Domain version.
3742+ string version
3743+
3744+ # Returns supported domains.
3745+ command getDomains
3746+ returns
3747+ # List of supported domains.
3748+ array of Domain domains
3749diff --git a/deps/v8/include/libplatform/v8-tracing.h b/deps/v8/include/libplatform/v8-tracing.h
3750index ccdca0a8c5..e7cd8bfcdb 100644
3751--- a/deps/v8/include/libplatform/v8-tracing.h
3752+++ b/deps/v8/include/libplatform/v8-tracing.h
3753@@ -14,6 +14,10 @@
3754 #include "libplatform/libplatform-export.h"
3755 #include "v8-platform.h" // NOLINT(build/include)
3756
3757+namespace perfetto {
3758+class TracingSession;
3759+}
3760+
3761 namespace v8 {
3762
3763 namespace base {
3764@@ -23,8 +27,8 @@ class Mutex;
3765 namespace platform {
3766 namespace tracing {
3767
3768-class PerfettoTracingController;
3769 class TraceEventListener;
3770+class JSONTraceEventListener;
3771
3772 const int kTraceMaxNumArgs = 2;
3773
3774@@ -292,11 +296,10 @@ class V8_PLATFORM_EXPORT TracingController
3775 std::unordered_set<v8::TracingController::TraceStateObserver*> observers_;
3776 std::atomic_bool recording_{false};
3777 #ifdef V8_USE_PERFETTO
3778- std::atomic_bool perfetto_recording_{false};
3779- std::unique_ptr<PerfettoTracingController> perfetto_tracing_controller_;
3780 std::ostream* output_stream_ = nullptr;
3781- std::unique_ptr<TraceEventListener> json_listener_;
3782+ std::unique_ptr<JSONTraceEventListener> json_listener_;
3783 TraceEventListener* listener_for_testing_ = nullptr;
3784+ std::unique_ptr<perfetto::TracingSession> tracing_session_;
3785 #endif
3786
3787 // Disallow copy and assign
3788diff --git a/deps/v8/include/v8-inspector.h b/deps/v8/include/v8-inspector.h
3789index b96a6e29ac..cfa2aaba96 100644
3790--- a/deps/v8/include/v8-inspector.h
3791+++ b/deps/v8/include/v8-inspector.h
3792@@ -109,6 +109,8 @@ class V8_EXPORT V8StackTrace {
3793 virtual ~V8StackTrace() = default;
3794 virtual std::unique_ptr<protocol::Runtime::API::StackTrace>
3795 buildInspectorObject() const = 0;
3796+ virtual std::unique_ptr<protocol::Runtime::API::StackTrace>
3797+ buildInspectorObject(int maxAsyncDepth) const = 0;
3798 virtual std::unique_ptr<StringBuffer> toString() const = 0;
3799
3800 // Safe to pass between threads, drops async chain.
3801@@ -130,10 +132,6 @@ class V8_EXPORT V8InspectorSession {
3802 // Dispatching protocol messages.
3803 static bool canDispatchMethod(const StringView& method);
3804 virtual void dispatchProtocolMessage(const StringView& message) = 0;
3805- virtual V8_DEPRECATED("Use state() instead",
3806- std::unique_ptr<StringBuffer> stateJSON()) {
3807- return nullptr;
3808- }
3809 virtual std::vector<uint8_t> state() = 0;
3810 virtual std::vector<std::unique_ptr<protocol::Schema::API::Domain>>
3811 supportedDomains() = 0;
3812diff --git a/deps/v8/include/v8-platform.h b/deps/v8/include/v8-platform.h
3813index b707fafc49..7e43b0d9db 100644
3814--- a/deps/v8/include/v8-platform.h
3815+++ b/deps/v8/include/v8-platform.h
3816@@ -439,6 +439,14 @@ class Platform {
3817 */
3818 virtual void DumpWithoutCrashing() {}
3819
3820+ /**
3821+ * Lets the embedder to add crash keys.
3822+ */
3823+ virtual void AddCrashKey(int id, const char* name, uintptr_t value) {
3824+ // "noop" is a valid implementation if the embedder doesn't care to log
3825+ // additional data for crashes.
3826+ }
3827+
3828 protected:
3829 /**
3830 * Default implementation of current wall-clock time in milliseconds
3831diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h
3832index e9c5c339f2..91d7633b05 100644
3833--- a/deps/v8/include/v8-version.h
3834+++ b/deps/v8/include/v8-version.h
3835@@ -9,9 +9,9 @@
3836 // NOTE these macros are used by some of the tool scripts and the build
3837 // system so their names cannot be changed without changing the scripts.
3838 #define V8_MAJOR_VERSION 7
3839-#define V8_MINOR_VERSION 6
3840-#define V8_BUILD_NUMBER 303
3841-#define V8_PATCH_LEVEL 29
3842+#define V8_MINOR_VERSION 7
3843+#define V8_BUILD_NUMBER 299
3844+#define V8_PATCH_LEVEL 4
3845
3846 // Use 1 for candidates and 0 otherwise.
3847 // (Boolean macro values are not supported by all preprocessors.)
3848diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h
3849index 3b73ae6413..429ec7481f 100644
3850--- a/deps/v8/include/v8.h
3851+++ b/deps/v8/include/v8.h
3852@@ -1359,6 +1359,37 @@ class V8_EXPORT Module {
3853 * kEvaluated or kErrored.
3854 */
3855 Local<UnboundModuleScript> GetUnboundModuleScript();
3856+
3857+ /*
3858+ * Callback defined in the embedder. This is responsible for setting
3859+ * the module's exported values with calls to SetSyntheticModuleExport().
3860+ * The callback must return a Value to indicate success (where no
3861+ * exception was thrown) and return an empy MaybeLocal to indicate falure
3862+ * (where an exception was thrown).
3863+ */
3864+ typedef MaybeLocal<Value> (*SyntheticModuleEvaluationSteps)(
3865+ Local<Context> context, Local<Module> module);
3866+
3867+ /**
3868+ * Creates a new SyntheticModule with the specified export names, where
3869+ * evaluation_steps will be executed upon module evaluation.
3870+ * export_names must not contain duplicates.
3871+ * module_name is used solely for logging/debugging and doesn't affect module
3872+ * behavior.
3873+ */
3874+ static Local<Module> CreateSyntheticModule(
3875+ Isolate* isolate, Local<String> module_name,
3876+ const std::vector<Local<String>>& export_names,
3877+ SyntheticModuleEvaluationSteps evaluation_steps);
3878+
3879+ /**
3880+ * Set this module's exported value for the name export_name to the specified
3881+ * export_value. This method must be called only on Modules created via
3882+ * CreateSyntheticModule. export_name must be one of the export_names that
3883+ * were passed in that CreateSyntheticModule call.
3884+ */
3885+ void SetSyntheticModuleExport(Local<String> export_name,
3886+ Local<Value> export_value);
3887 };
3888
3889 /**
3890@@ -3420,7 +3451,8 @@ class V8_EXPORT Object : public Value {
3891 //
3892 // Returns true on success.
3893 V8_WARN_UNUSED_RESULT Maybe<bool> DefineProperty(
3894- Local<Context> context, Local<Name> key, PropertyDescriptor& descriptor);
3895+ Local<Context> context, Local<Name> key,
3896+ PropertyDescriptor& descriptor); // NOLINT(runtime/references)
3897
3898 V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
3899 V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
3900@@ -5437,6 +5469,8 @@ class V8_EXPORT RegExp : public Object {
3901 kDotAll = 1 << 5,
3902 };
3903
3904+ static constexpr int kFlagCount = 6;
3905+
3906 /**
3907 * Creates a regular expression from the given pattern string and
3908 * the flags bit field. May throw a JavaScript exception as
3909@@ -6538,7 +6572,19 @@ V8_INLINE Local<Boolean> False(Isolate* isolate);
3910 */
3911 class V8_EXPORT ResourceConstraints {
3912 public:
3913- ResourceConstraints();
3914+ /**
3915+ * Configures the constraints with reasonable default values based on the
3916+ * provided heap size limit. The heap size includes both the young and
3917+ * the old generation.
3918+ *
3919+ * \param maximum_heap_size_in_bytes The hard limit for the heap size.
3920+ * When the heap size approaches this limit, V8 will perform series of
3921+ * garbage collections and invoke the NearHeapLimitCallback.
3922+ * If the garbage collections do not help and the callback does not
3923+ * increase the limit, then V8 will crash with V8::FatalProcessOutOfMemory.
3924+ */
3925+ void ConfigureDefaultsFromHeapSize(size_t initial_heap_size_in_bytes,
3926+ size_t maximum_heap_size_in_bytes);
3927
3928 /**
3929 * Configures the constraints with reasonable default values based on the
3930@@ -6552,26 +6598,81 @@ class V8_EXPORT ResourceConstraints {
3931 void ConfigureDefaults(uint64_t physical_memory,
3932 uint64_t virtual_memory_limit);
3933
3934- // Returns the max semi-space size in KB.
3935- size_t max_semi_space_size_in_kb() const {
3936- return max_semi_space_size_in_kb_;
3937+ /**
3938+ * The address beyond which the VM's stack may not grow.
3939+ */
3940+ uint32_t* stack_limit() const { return stack_limit_; }
3941+ void set_stack_limit(uint32_t* value) { stack_limit_ = value; }
3942+
3943+ /**
3944+ * The amount of virtual memory reserved for generated code. This is relevant
3945+ * for 64-bit architectures that rely on code range for calls in code.
3946+ */
3947+ size_t code_range_size_in_bytes() const { return code_range_size_; }
3948+ void set_code_range_size_in_bytes(size_t limit) { code_range_size_ = limit; }
3949+
3950+ /**
3951+ * The maximum size of the old generation.
3952+ * When the old generation approaches this limit, V8 will perform series of
3953+ * garbage collections and invoke the NearHeapLimitCallback.
3954+ * If the garbage collections do not help and the callback does not
3955+ * increase the limit, then V8 will crash with V8::FatalProcessOutOfMemory.
3956+ */
3957+ size_t max_old_generation_size_in_bytes() const {
3958+ return max_old_generation_size_;
3959+ }
3960+ void set_max_old_generation_size_in_bytes(size_t limit) {
3961+ max_old_generation_size_ = limit;
3962 }
3963
3964- // Sets the max semi-space size in KB.
3965- void set_max_semi_space_size_in_kb(size_t limit_in_kb) {
3966- max_semi_space_size_in_kb_ = limit_in_kb;
3967+ /**
3968+ * The maximum size of the young generation, which consists of two semi-spaces
3969+ * and a large object space. This affects frequency of Scavenge garbage
3970+ * collections and should be typically much smaller that the old generation.
3971+ */
3972+ size_t max_young_generation_size_in_bytes() const {
3973+ return max_young_generation_size_;
3974+ }
3975+ void set_max_young_generation_size_in_bytes(size_t limit) {
3976+ max_young_generation_size_ = limit;
3977 }
3978
3979- size_t max_old_space_size() const { return max_old_space_size_; }
3980- void set_max_old_space_size(size_t limit_in_mb) {
3981- max_old_space_size_ = limit_in_mb;
3982+ size_t initial_old_generation_size_in_bytes() const {
3983+ return initial_old_generation_size_;
3984 }
3985- uint32_t* stack_limit() const { return stack_limit_; }
3986- // Sets an address beyond which the VM's stack may not grow.
3987- void set_stack_limit(uint32_t* value) { stack_limit_ = value; }
3988- size_t code_range_size() const { return code_range_size_; }
3989- void set_code_range_size(size_t limit_in_mb) {
3990- code_range_size_ = limit_in_mb;
3991+ void set_initial_old_generation_size_in_bytes(size_t initial_size) {
3992+ initial_old_generation_size_ = initial_size;
3993+ }
3994+
3995+ size_t initial_young_generation_size_in_bytes() const {
3996+ return initial_young_generation_size_;
3997+ }
3998+ void set_initial_young_generation_size_in_bytes(size_t initial_size) {
3999+ initial_young_generation_size_ = initial_size;
4000+ }
4001+
4002+ /**
4003+ * Deprecated functions. Do not use in new code.
4004+ */
4005+ V8_DEPRECATE_SOON("Use code_range_size_in_bytes.",
4006+ size_t code_range_size() const) {
4007+ return code_range_size_ / kMB;
4008+ }
4009+ V8_DEPRECATE_SOON("Use set_code_range_size_in_bytes.",
4010+ void set_code_range_size(size_t limit_in_mb)) {
4011+ code_range_size_ = limit_in_mb * kMB;
4012+ }
4013+ V8_DEPRECATE_SOON("Use max_young_generation_size_in_bytes.",
4014+ size_t max_semi_space_size_in_kb() const);
4015+ V8_DEPRECATE_SOON("Use set_max_young_generation_size_in_bytes.",
4016+ void set_max_semi_space_size_in_kb(size_t limit_in_kb));
4017+ V8_DEPRECATE_SOON("Use max_old_generation_size_in_bytes.",
4018+ size_t max_old_space_size() const) {
4019+ return max_old_generation_size_ / kMB;
4020+ }
4021+ V8_DEPRECATE_SOON("Use set_max_old_generation_size_in_bytes.",
4022+ void set_max_old_space_size(size_t limit_in_mb)) {
4023+ max_old_generation_size_ = limit_in_mb * kMB;
4024 }
4025 V8_DEPRECATE_SOON("Zone does not pool memory any more.",
4026 size_t max_zone_pool_size() const) {
4027@@ -6583,14 +6684,14 @@ class V8_EXPORT ResourceConstraints {
4028 }
4029
4030 private:
4031- // max_semi_space_size_ is in KB
4032- size_t max_semi_space_size_in_kb_;
4033-
4034- // The remaining limits are in MB
4035- size_t max_old_space_size_;
4036- uint32_t* stack_limit_;
4037- size_t code_range_size_;
4038- size_t max_zone_pool_size_;
4039+ static constexpr size_t kMB = 1048576u;
4040+ size_t code_range_size_ = 0;
4041+ size_t max_old_generation_size_ = 0;
4042+ size_t max_young_generation_size_ = 0;
4043+ size_t max_zone_pool_size_ = 0;
4044+ size_t initial_old_generation_size_ = 0;
4045+ size_t initial_young_generation_size_ = 0;
4046+ uint32_t* stack_limit_ = nullptr;
4047 };
4048
4049
4050@@ -6892,6 +6993,8 @@ typedef void (*FailedAccessCheckCallback)(Local<Object> target,
4051 */
4052 typedef bool (*AllowCodeGenerationFromStringsCallback)(Local<Context> context,
4053 Local<String> source);
4054+typedef MaybeLocal<String> (*ModifyCodeGenerationFromStringsCallback)(
4055+ Local<Context> context, Local<Value> source);
4056
4057 // --- WebAssembly compilation callbacks ---
4058 typedef bool (*ExtensionCallback)(const FunctionCallbackInfo<Value>&);
4059@@ -7352,12 +7455,13 @@ class V8_EXPORT EmbedderHeapTracer {
4060 void GarbageCollectionForTesting(EmbedderStackState stack_state);
4061
4062 /*
4063- * Called by the embedder to signal newly allocated memory. Not bound to
4064- * tracing phases. Embedders should trade off when increments are reported as
4065- * V8 may consult global heuristics on whether to trigger garbage collection
4066- * on this change.
4067+ * Called by the embedder to signal newly allocated or freed memory. Not bound
4068+ * to tracing phases. Embedders should trade off when increments are reported
4069+ * as V8 may consult global heuristics on whether to trigger garbage
4070+ * collection on this change.
4071 */
4072 void IncreaseAllocatedSize(size_t bytes);
4073+ void DecreaseAllocatedSize(size_t bytes);
4074
4075 /*
4076 * Returns the v8::Isolate this tracer is attached too and |nullptr| if it
4077@@ -7685,6 +7789,8 @@ class V8_EXPORT Isolate {
4078 kRegExpMatchIsFalseishOnJSRegExp = 73,
4079 kDateGetTimezoneOffset = 74,
4080 kStringNormalize = 75,
4081+ kCallSiteAPIGetFunctionSloppyCall = 76,
4082+ kCallSiteAPIGetThisSloppyCall = 77,
4083
4084 // If you add new values here, you'll also need to update Chromium's:
4085 // web_feature.mojom, UseCounterCallback.cpp, and enums.xml. V8 changes to
4086@@ -8489,6 +8595,8 @@ class V8_EXPORT Isolate {
4087 */
4088 void SetAllowCodeGenerationFromStringsCallback(
4089 AllowCodeGenerationFromStringsCallback callback);
4090+ void SetModifyCodeGenerationFromStringsCallback(
4091+ ModifyCodeGenerationFromStringsCallback callback);
4092
4093 /**
4094 * Set the callback to invoke to check if wasm code generation should
4095@@ -9524,6 +9632,15 @@ class V8_EXPORT Context {
4096 template <class T>
4097 V8_INLINE MaybeLocal<T> GetDataFromSnapshotOnce(size_t index);
4098
4099+ /**
4100+ * If callback is set, abort any attempt to execute JavaScript in this
4101+ * context, call the specified callback, and throw an exception.
4102+ * To unset abort, pass nullptr as callback.
4103+ */
4104+ typedef void (*AbortScriptExecutionCallback)(Isolate* isolate,
4105+ Local<Context> context);
4106+ void SetAbortScriptExecution(AbortScriptExecutionCallback callback);
4107+
4108 /**
4109 * Stack-allocated class which sets the execution context for all
4110 * operations executed within a local scope.
4111diff --git a/deps/v8/include/v8config.h b/deps/v8/include/v8config.h
4112index 5ec0480cf5..7bd2938225 100644
4113--- a/deps/v8/include/v8config.h
4114+++ b/deps/v8/include/v8config.h
4115@@ -353,6 +353,12 @@
4116 #define V8_WARN_UNUSED_RESULT /* NOT SUPPORTED */
4117 #endif
4118
4119+#if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED)
4120+#error Inconsistent build configuration: To build the V8 shared library \
4121+set BUILDING_V8_SHARED, to include its headers for linking against the \
4122+V8 shared library set USING_V8_SHARED.
4123+#endif
4124+
4125 #ifdef V8_OS_WIN
4126
4127 // Setup for Windows DLL export/import. When building the V8 DLL the