Newer
Older
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
"id": "TypeDescription",
"type": "object",
"description": "Container for type information that has been gathered.",
"properties": [
{ "name": "isValid", "type": "boolean", "description": "If true, we were able to correlate the offset successfuly with a program location. If false, the offset may be bogus or the offset may be from a CodeBlock that hasn't executed." },
{ "name": "leastCommonAncestor", "type": "string", "optional": true, "description": "Least common ancestor of all Constructors if the TypeDescription has seen any structures. This string is the display name of the shared constructor function." },
{ "name": "typeSet", "$ref": "TypeSet", "optional": true, "description": "Set of booleans for determining the aggregate type of this type description." },
{ "name": "structures", "type": "array", "items": { "$ref": "StructureDescription" }, "optional": true, "description": "Array of descriptions for all structures seen for this variable." },
{ "name": "isTruncated", "type": "boolean", "optional": true, "description": "If true, this indicates that no more structures are being profiled because some maximum threshold has been reached and profiling has stopped because of memory pressure." }
]
},
{
"id": "TypeLocation",
"type": "object",
"description": "Describes the location of an expression we want type information for.",
"properties": [
{ "name": "typeInformationDescriptor", "type": "integer", "description": "What kind of type information do we want (normal, function return values, 'this' statement)." },
{ "name": "sourceID", "type": "string", "description": "sourceID uniquely identifying a script" },
{ "name": "divot", "type": "integer", "description": "character offset for assignment range" }
]
},
{
"id": "BasicBlock",
"type": "object",
"description": "From Wikipedia: a basic block is a portion of the code within a program with only one entry point and only one exit point. This type gives the location of a basic block and if that basic block has executed.",
"properties": [
{ "name": "startOffset", "type": "integer", "description": "Start offset of the basic block." },
{ "name": "endOffset", "type": "integer", "description": "End offset of the basic block." },
{ "name": "hasExecuted", "type": "boolean", "description": "Indicates if the basic block has executed before." }
]
}
],
"commands": [
{
"name": "parse",
"parameters": [
{ "name": "source", "type": "string", "description": "Source code to parse." }
],
"returns": [
{ "name": "result", "$ref": "SyntaxErrorType", "description": "Parse result." },
{ "name": "message", "type": "string", "optional": true, "description": "Parse error message." },
{ "name": "range", "$ref": "ErrorRange", "optional": true, "description": "Range in the source where the error occurred." }
],
"description": "Parses JavaScript source code for errors."
},
{
"name": "evaluate",
"parameters": [
{ "name": "expression", "type": "string", "description": "Expression to evaluate." },
{ "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
{ "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation." },
{ "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state." },
{ "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." },
{ "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value." },
{ "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result." },
{ "name": "saveResult", "type": "boolean", "optional": true, "description": "Whether the resulting value should be considered for saving in the $n history." }
],
"returns": [
{ "name": "result", "$ref": "RemoteObject", "description": "Evaluation result." },
{ "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." },
{ "name": "savedResultIndex", "type": "integer", "optional": true, "description": "If the result was saved, this is the $n index that can be used to access the value." }
],
"description": "Evaluates expression on global object."
},
{
"name": "callFunctionOn",
"parameters": [
{ "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to call function on." },
{ "name": "functionDeclaration", "type": "string", "description": "Declaration of the function to call." },
{ "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." },
{ "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether function call should stop on exceptions and mute console. Overrides setPauseOnException state." },
{ "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value." },
{ "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result." }
],
"returns": [
{ "name": "result", "$ref": "RemoteObject", "description": "Call result." },
{ "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." }
],
"description": "Calls function with given declaration on the given object. Object group of the result is inherited from the target object."
},
{
"name": "getProperties",
"parameters": [
{ "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to return properties for." },
{ "name": "ownProperties", "optional": true, "type": "boolean", "description": "If true, returns properties belonging only to the object itself, not to its prototype chain." },
{ "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for property values." }
],
"returns": [
{ "name": "result", "type": "array", "items": { "$ref": "PropertyDescriptor"}, "description": "Object properties." },
{ "name": "internalProperties", "optional": true, "type": "array", "items": { "$ref": "InternalPropertyDescriptor"}, "description": "Internal object properties." }
],
"description": "Returns properties of a given object. Object group of the result is inherited from the target object."
},
{
"name": "getDisplayableProperties",
"parameters": [
{ "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to return properties for." },
{ "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for property values." }
],
"returns": [
{ "name": "properties", "type": "array", "items": { "$ref": "PropertyDescriptor"}, "description": "Object properties." },
{ "name": "internalProperties", "optional": true, "type": "array", "items": { "$ref": "InternalPropertyDescriptor"}, "description": "Internal object properties." }
],
"description": "Returns displayable properties of a given object. Object group of the result is inherited from the target object. Displayable properties are own properties, internal properties, and native getters in the prototype chain (assumed to be bindings and treated like own properties for the frontend)."
},
{
"name": "getCollectionEntries",
"description": "Returns entries of given Map / Set collection.",
"parameters": [
{ "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Id of the collection to get entries for." },
{ "name": "objectGroup", "optional": true, "type": "string", "description": "Symbolic group name that can be used to release multiple. If not provided, it will be the same objectGroup as the RemoteObject determined from <code>objectId</code>. This is useful for WeakMap to release the collection entries." },
{ "name": "startIndex", "optional": true, "type": "integer", "description": "If provided skip to this index before collecting values. Otherwise, 0." },
{ "name": "numberToFetch", "optional": true, "type": "integer", "description": "If provided only return <code>numberToFetch</code> values. Otherwise, return values all the way to the end." }
],
"returns": [
{ "name": "entries", "type": "array", "items": { "$ref": "CollectionEntry" }, "description": "Array of collection entries." }
]
},
{
"name": "saveResult",
"parameters": [
{ "name": "value", "$ref": "CallArgument", "description": "Id or value of the object to save." },
{ "name": "contextId", "optional": true, "$ref": "ExecutionContextId", "description": "Unique id of the execution context. To specify in which execution context script evaluation should be performed. If not provided, determine from the CallArgument's objectId." }
],
"returns": [
{ "name": "savedResultIndex", "type": "integer", "optional": true, "description": "If the value was saved, this is the $n index that can be used to access the value." }
],
"description": "Assign a saved result index to this value."
},
{
"name": "releaseObject",
"parameters": [
{ "name": "objectId", "$ref": "RemoteObjectId", "description": "Identifier of the object to release." }
],
"description": "Releases remote object with given id."
},
{
"name": "releaseObjectGroup",
"parameters": [
{ "name": "objectGroup", "type": "string", "description": "Symbolic object group name." }
],
"description": "Releases all remote objects that belong to a given group."
},
{
"name": "enable",
"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."
},
{
"name": "disable",
"description": "Disables reporting of execution contexts creation."
},
{
"name": "getRuntimeTypesForVariablesAtOffsets",
"parameters": [
{ "name": "locations", "type": "array", "items": { "$ref": "TypeLocation" }, "description": "An array of type locations we're requesting information for. Results are expected in the same order they're sent in."}
],
"returns": [
{ "name": "types", "type": "array", "items": { "$ref": "TypeDescription", "description": "Types for requested variable." } }
],
"description": "Returns detailed informtation on given function."
},
{
"name": "enableTypeProfiler",
"description": "Enables type profiling on the VM."
},
{
"name": "disableTypeProfiler",
"description": "Disables type profiling on the VM."
},
{
"name": "getBasicBlocks",
"parameters": [
{ "name": "sourceID", "type": "string", "description": "Indicates which sourceID information is requested for." }
],
"returns": [
{ "name": "basicBlocks", "type": "array", "items": { "$ref": "BasicBlock", "description": "Array of basic blocks." } }
],
"description": "Returns a list of basic blocks for the given sourceID with information about their text ranges and whether or not they have executed."
}
],
"events": [
{
"name": "executionContextCreated",
"parameters": [
{ "name": "context", "$ref": "ExecutionContextDescription", "description": "A newly created execution contex." }
],
"description": "Issued when new execution context is created."
}
]
}
,
{
"domain": "Timeline",
"description": "Timeline provides its clients with instrumentation records that are generated during the page runtime. Timeline instrumentation can be started and stopped using corresponding commands. While timeline is started, it is generating timeline event records.",
"availability": "web",
"types": [
{
"id": "EventType",
"type": "string",
"enum": [
"EventDispatch",
"ScheduleStyleRecalculation",
"RecalculateStyles",
"InvalidateLayout",
"Layout",
"Paint",
"Composite",
"RenderingFrame",
"ParseHTML",
"TimerInstall",
"TimerRemove",
"TimerFire",
"EvaluateScript",
"MarkLoad",
"MarkDOMContent",
"TimeStamp",
"Time",
"TimeEnd",
"XHRReadyStateChange",
"XHRLoad",
"FunctionCall",
"ProbeSample",
"ConsoleProfile",
"RequestAnimationFrame",
"CancelAnimationFrame",
"FireAnimationFrame",
"WebSocketCreate",
"WebSocketSendHandshakeRequest",
"WebSocketReceiveHandshakeResponse",
"WebSocketDestroy"
],
"description": "Timeline record type."
},
{
"id": "TimelineEvent",
"type": "object",
"properties": [
{ "name": "type", "$ref": "EventType", "description": "Event type." },
{ "name": "data", "type": "object", "description": "Event data." },
{ "name": "children", "type": "array", "optional": true, "items": { "$ref": "TimelineEvent" }, "description": "Nested records." }
],
"description": "Timeline record contains information about the recorded activity."
},
{
"id": "CPUProfileNodeAggregateCallInfo",
"type": "object",
"description": "Aggregate CPU Profile call info. Holds time information for all the calls that happened on a node.",
"properties": [
{ "name": "callCount", "type": "number", "description": "Total number of calls." },
{ "name": "startTime", "type": "number", "description": "Start time for the first call." },
{ "name": "endTime", "type": "number", "description": "End time for the last call." },
{ "name": "totalTime", "type": "number", "description": "Total execution time for all calls combined." }
]
},
{
"id": "CPUProfileNode",
"type": "object",
"description": "CPU Profile node. Holds callsite information, execution statistics and child nodes.",
"properties": [
{ "name": "id", "type": "integer", "description": "Unique identifier for this call site." },
{ "name": "callInfo", "$ref": "CPUProfileNodeAggregateCallInfo", "description": "Aggregate info about all the calls that making up this node." },
{ "name": "functionName", "type": "string", "optional": true, "description": "Function name." },
{ "name": "url", "type": "string", "optional": true, "description": "URL." },
{ "name": "lineNumber", "type": "integer", "optional": true, "description": "Line number." },
{ "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number." },
{ "name": "children", "type": "array", "items": { "$ref": "CPUProfileNode" }, "optional": true, "description": "Child nodes." }
]
},
{
"id": "CPUProfile",
"type": "object",
"description": "Profile.",
"properties": [
{ "name": "rootNodes", "type": "array", "items": { "$ref": "CPUProfileNode" }, "description": "Top level nodes in the stack." },
{ "name": "idleTime", "type": "number", "optional": true }
]
}
],
"commands": [
{
"name": "start",
"parameters": [
{ "name": "maxCallStackDepth", "optional": true, "type": "integer", "description": "Samples JavaScript stack traces up to <code>maxCallStackDepth</code>, defaults to 5." }
],
"description": "Starts capturing instrumentation events."
},
{
"name": "stop",
"description": "Stops capturing instrumentation events."
}
],
"events": [
{
"name": "eventRecorded",
"parameters": [
{ "name": "record", "$ref": "TimelineEvent", "description": "Timeline event record data." }
],
"description": "Fired for every instrumentation event while timeline is started."
},
{
"name": "recordingStarted",
"description": "Fired when recording has started."
},
{
"name": "recordingStopped",
"description": "Fired when recording has stopped."
}
]
}
]}