57b1dc9acf
This includes the class name of the target object as part of the description for Proxy objects, i.e. `Proxy(HTMLElement)` for proxies whose targets are `HTMLElement`s. This greatly improves the debugging experience with proxies, which are becoming more common these days (for example with Vue using proxies for their components). Before: https://imgur.com/SbR4s6H.png After: https://imgur.com/NWQJFj8.png Fixed: chromium:1400253 Change-Id: I3bd2b0f91a3aeaa531d5e5dd2ca3e777e4663ba1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4109729 Reviewed-by: Kim-Anh Tran <kimanh@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/main@{#84864}
185 lines
4.3 KiB
Plaintext
185 lines
4.3 KiB
Plaintext
Check that while Runtime.getProperties call on proxy object no user defined trap will be executed.
|
|
Testing regular Proxy
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : {
|
|
className : Object
|
|
description : Proxy(Object)
|
|
objectId : <objectId>
|
|
preview : {
|
|
description : Proxy(Object)
|
|
overflow : false
|
|
properties : [
|
|
[0] : {
|
|
name : a
|
|
type : number
|
|
value : 1
|
|
}
|
|
]
|
|
subtype : proxy
|
|
type : object
|
|
}
|
|
subtype : proxy
|
|
type : object
|
|
}
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[Handler]]
|
|
value : {
|
|
className : Object
|
|
description : Object
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[Target]]
|
|
value : {
|
|
className : Object
|
|
description : Object
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
}
|
|
[2] : {
|
|
name : [[IsRevoked]]
|
|
value : {
|
|
type : boolean
|
|
value : false
|
|
}
|
|
}
|
|
]
|
|
result : [
|
|
]
|
|
}
|
|
}
|
|
Testing revocable Proxy
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : {
|
|
className : Object
|
|
description : Proxy(Object)
|
|
objectId : <objectId>
|
|
preview : {
|
|
description : Proxy(Object)
|
|
overflow : false
|
|
properties : [
|
|
[0] : {
|
|
name : a
|
|
type : number
|
|
value : 1
|
|
}
|
|
]
|
|
subtype : proxy
|
|
type : object
|
|
}
|
|
subtype : proxy
|
|
type : object
|
|
}
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[Handler]]
|
|
value : {
|
|
className : Object
|
|
description : Object
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[Target]]
|
|
value : {
|
|
className : Object
|
|
description : Object
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
}
|
|
[2] : {
|
|
name : [[IsRevoked]]
|
|
value : {
|
|
type : boolean
|
|
value : false
|
|
}
|
|
}
|
|
]
|
|
result : [
|
|
]
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : {
|
|
className : Object
|
|
description : Proxy
|
|
objectId : <objectId>
|
|
preview : {
|
|
description : Proxy
|
|
overflow : false
|
|
properties : [
|
|
]
|
|
subtype : proxy
|
|
type : object
|
|
}
|
|
subtype : proxy
|
|
type : object
|
|
}
|
|
}
|
|
}
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[Handler]]
|
|
value : {
|
|
subtype : null
|
|
type : object
|
|
value : null
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[Target]]
|
|
value : {
|
|
subtype : null
|
|
type : object
|
|
value : null
|
|
}
|
|
}
|
|
[2] : {
|
|
name : [[IsRevoked]]
|
|
value : {
|
|
type : boolean
|
|
value : true
|
|
}
|
|
}
|
|
]
|
|
result : [
|
|
]
|
|
}
|
|
}
|
|
Checking counter
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
result : {
|
|
description : 0
|
|
type : number
|
|
value : 0
|
|
}
|
|
}
|
|
}
|