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}
142 lines
2.5 KiB
Plaintext
142 lines
2.5 KiB
Plaintext
Tests that creating multiple sessions works.
|
|
Connecting session 1
|
|
From session 1
|
|
{
|
|
method : Runtime.executionContextCreated
|
|
params : {
|
|
context : {
|
|
id : 1
|
|
name :
|
|
origin :
|
|
uniqueId : <uniqueId>
|
|
}
|
|
}
|
|
}
|
|
Connecting session 2
|
|
From session 2
|
|
{
|
|
method : Runtime.executionContextCreated
|
|
params : {
|
|
context : {
|
|
id : 1
|
|
name :
|
|
origin :
|
|
uniqueId : <uniqueId>
|
|
}
|
|
}
|
|
}
|
|
Reconnecting session 2
|
|
From session 2
|
|
{
|
|
method : Runtime.executionContextCreated
|
|
params : {
|
|
context : {
|
|
id : 1
|
|
name :
|
|
origin :
|
|
uniqueId : <uniqueId>
|
|
}
|
|
}
|
|
}
|
|
Reconnecting session 1
|
|
From session 1
|
|
{
|
|
method : Runtime.executionContextCreated
|
|
params : {
|
|
context : {
|
|
id : 1
|
|
name :
|
|
origin :
|
|
uniqueId : <uniqueId>
|
|
}
|
|
}
|
|
}
|
|
Connecting session 3
|
|
From session 3
|
|
{
|
|
method : Runtime.executionContextCreated
|
|
params : {
|
|
context : {
|
|
id : 1
|
|
name :
|
|
origin :
|
|
uniqueId : <uniqueId>
|
|
}
|
|
}
|
|
}
|
|
Destroying and creating context
|
|
From session 2
|
|
{
|
|
method : Runtime.executionContextDestroyed
|
|
params : {
|
|
executionContextId : <executionContextId>
|
|
}
|
|
}
|
|
id matching: true
|
|
From session 1
|
|
{
|
|
method : Runtime.executionContextDestroyed
|
|
params : {
|
|
executionContextId : <executionContextId>
|
|
}
|
|
}
|
|
id matching: true
|
|
From session 3
|
|
{
|
|
method : Runtime.executionContextDestroyed
|
|
params : {
|
|
executionContextId : <executionContextId>
|
|
}
|
|
}
|
|
id matching: true
|
|
From session 2
|
|
{
|
|
method : Runtime.executionContextCreated
|
|
params : {
|
|
context : {
|
|
id : 2
|
|
name :
|
|
origin :
|
|
uniqueId : <uniqueId>
|
|
}
|
|
}
|
|
}
|
|
From session 1
|
|
{
|
|
method : Runtime.executionContextCreated
|
|
params : {
|
|
context : {
|
|
id : 2
|
|
name :
|
|
origin :
|
|
uniqueId : <uniqueId>
|
|
}
|
|
}
|
|
}
|
|
From session 3
|
|
{
|
|
method : Runtime.executionContextCreated
|
|
params : {
|
|
context : {
|
|
id : 2
|
|
name :
|
|
origin :
|
|
uniqueId : <uniqueId>
|
|
}
|
|
}
|
|
}
|
|
Disconnecting all sessions
|
|
Connecting session 4
|
|
From session 4
|
|
{
|
|
method : Runtime.executionContextCreated
|
|
params : {
|
|
context : {
|
|
id : 2
|
|
name :
|
|
origin :
|
|
uniqueId : <uniqueId>
|
|
}
|
|
}
|
|
}
|