5b9adade64
Before this, only the [[ProxyHandler]] was set to null during revocation of the Proxy through either the v8::Proxy::Revoke() or the Proxy.revocable() API. To be consistent with the spec, the Proxy's target is set to null as well. This change should not be observable through JS, since the check for if the Proxy is revoked should always use the handler. But the changed value is exposed through the public v8::Proxy::GetTarget() API, which is used by the inspector API and Node.js. Also included is a much more comprehensive test for Inspector's support for Proxy, which prior to this commit did not work as intended. Bug: Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I727607ec2b3cea8642cd636573932c1e6bb5cc07 Reviewed-on: https://chromium-review.googlesource.com/854676 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#50476}
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
|
|
objectId : <objectId>
|
|
preview : {
|
|
description : Proxy
|
|
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
|
|
objectId : <objectId>
|
|
preview : {
|
|
description : Proxy
|
|
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
|
|
}
|
|
}
|
|
}
|