f656eab592
This adds ExecutionContextDescription.uniqueId for a system-unique way to identify an execution context and supports it in Runtime.evaluate. This allows a client to avoid accidentally executing an expression in a context different from that originally intended if a navigation occurs while Runtime.evaluate is in flight. Design doc: https://docs.google.com/document/d/1vGVWvKP9FTTX6kimcUJR_PAfVgDeIzXXITFpl0SyghQ Bug: v8:11268, chromium:1101897 Change-Id: I4c6bec562ffc85312559316f639d641780144039 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2594538 Commit-Queue: Andrey Kosyakov <caseq@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#71869}
116 lines
2.6 KiB
Plaintext
116 lines
2.6 KiB
Plaintext
Checks that Runtime agent correctly restore its state.
|
|
|
|
Running test: testExecutionContextsNotificationsOnRestore
|
|
{
|
|
method : Runtime.executionContextCreated
|
|
params : {
|
|
context : {
|
|
id : 1
|
|
name :
|
|
origin :
|
|
uniqueId : <uniqueId>
|
|
}
|
|
}
|
|
}
|
|
will reconnect..
|
|
{
|
|
method : Runtime.executionContextsCleared
|
|
params : {
|
|
}
|
|
}
|
|
{
|
|
method : Runtime.executionContextCreated
|
|
params : {
|
|
context : {
|
|
id : 1
|
|
name :
|
|
origin :
|
|
uniqueId : <uniqueId>
|
|
}
|
|
}
|
|
}
|
|
|
|
Running test: testConsoleAPICalledAfterRestore
|
|
will reconnect..
|
|
{
|
|
method : Runtime.consoleAPICalled
|
|
params : {
|
|
args : [
|
|
[0] : {
|
|
description : 42
|
|
type : number
|
|
value : 42
|
|
}
|
|
]
|
|
executionContextId : <executionContextId>
|
|
stackTrace : {
|
|
callFrames : [
|
|
[0] : {
|
|
columnNumber : 8
|
|
functionName :
|
|
lineNumber : 0
|
|
scriptId : <scriptId>
|
|
url :
|
|
}
|
|
]
|
|
}
|
|
timestamp : <timestamp>
|
|
type : log
|
|
}
|
|
}
|
|
|
|
Running test: testSetCustomObjectFormatterEnabled
|
|
will reconnect..
|
|
will reconnect..
|
|
{
|
|
method : Runtime.consoleAPICalled
|
|
params : {
|
|
args : [
|
|
[0] : {
|
|
className : Object
|
|
customPreview : {
|
|
bodyGetterId : <bodyGetterId>
|
|
header : ["span",{},"Header formatted ",42]
|
|
}
|
|
description : Object
|
|
objectId : <objectId>
|
|
preview : {
|
|
description : Object
|
|
overflow : false
|
|
properties : [
|
|
[0] : {
|
|
name : name
|
|
type : number
|
|
value : 42
|
|
}
|
|
]
|
|
type : object
|
|
}
|
|
type : object
|
|
}
|
|
]
|
|
executionContextId : <executionContextId>
|
|
stackTrace : {
|
|
callFrames : [
|
|
[0] : {
|
|
columnNumber : 8
|
|
functionName :
|
|
lineNumber : 0
|
|
scriptId : <scriptId>
|
|
url :
|
|
}
|
|
]
|
|
}
|
|
timestamp : <timestamp>
|
|
type : log
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : {
|
|
type : undefined
|
|
}
|
|
}
|
|
}
|