d9fbfeb894
This property might be useful for fast '===' check. R=dgozman@chromium.org,yangguo@chromium.org Bug: none Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel Change-Id: Iabc3555ce1ec2c14cf0ccd40b7d964ae144e7352 Reviewed-on: https://chromium-review.googlesource.com/1226411 Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Cr-Commit-Position: refs/heads/master@{#56095}
671 lines
18 KiB
Plaintext
671 lines
18 KiB
Plaintext
Checks internal properties in Runtime.getProperties output
|
|
|
|
Running test: generatorFunction
|
|
expression: (function* foo() { yield 1 })
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
[1] : {
|
|
name : [[FunctionLocation]]
|
|
value : {
|
|
description : Object
|
|
subtype : internal#location
|
|
type : object
|
|
value : {
|
|
columnNumber : 14
|
|
lineNumber : 0
|
|
scriptId : <scriptId>
|
|
}
|
|
}
|
|
}
|
|
[2] : {
|
|
name : [[IsGenerator]]
|
|
value : {
|
|
type : boolean
|
|
value : true
|
|
}
|
|
}
|
|
[3] : {
|
|
name : [[Scopes]]
|
|
value : {
|
|
className : Array
|
|
description : Scopes[1]
|
|
objectId : <objectId>
|
|
subtype : internal#scopeList
|
|
type : object
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
Running test: regularFunction
|
|
expression: (function foo() {})
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
[1] : {
|
|
name : [[FunctionLocation]]
|
|
value : {
|
|
description : Object
|
|
subtype : internal#location
|
|
type : object
|
|
value : {
|
|
columnNumber : 13
|
|
lineNumber : 0
|
|
scriptId : <scriptId>
|
|
}
|
|
}
|
|
}
|
|
[2] : {
|
|
name : [[Scopes]]
|
|
value : {
|
|
className : Array
|
|
description : Scopes[1]
|
|
objectId : <objectId>
|
|
subtype : internal#scopeList
|
|
type : object
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
Running test: boxedObjects
|
|
expression: new Number(239)
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[PrimitiveValue]]
|
|
value : {
|
|
description : 239
|
|
type : number
|
|
value : 239
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
]
|
|
}
|
|
}
|
|
expression: new Boolean(false)
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[PrimitiveValue]]
|
|
value : {
|
|
type : boolean
|
|
value : false
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
]
|
|
}
|
|
}
|
|
expression: new String('abc')
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[PrimitiveValue]]
|
|
value : {
|
|
type : string
|
|
value : abc
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
]
|
|
}
|
|
}
|
|
expression: Object(Symbol(42))
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[PrimitiveValue]]
|
|
value : {
|
|
description : Symbol(42)
|
|
objectId : <objectId>
|
|
type : symbol
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
]
|
|
}
|
|
}
|
|
expression: Object(BigInt(2))
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[PrimitiveValue]]
|
|
value : {
|
|
description : 2n
|
|
type : bigint
|
|
unserializableValue : 2n
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
Running test: promise
|
|
expression: Promise.resolve(42)
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[PromiseStatus]]
|
|
value : {
|
|
type : string
|
|
value : resolved
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[PromiseValue]]
|
|
value : {
|
|
description : 42
|
|
type : number
|
|
value : 42
|
|
}
|
|
}
|
|
[2] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
]
|
|
}
|
|
}
|
|
expression: new Promise(() => undefined)
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[PromiseStatus]]
|
|
value : {
|
|
type : string
|
|
value : pending
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[PromiseValue]]
|
|
value : {
|
|
type : undefined
|
|
}
|
|
}
|
|
[2] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
Running test: generatorObject
|
|
expression: gen1
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[GeneratorStatus]]
|
|
value : {
|
|
type : string
|
|
value : suspended
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[GeneratorFunction]]
|
|
value : {
|
|
className : GeneratorFunction
|
|
description : function* foo() { yield 1; }
|
|
objectId : <objectId>
|
|
type : function
|
|
}
|
|
}
|
|
[2] : {
|
|
name : [[GeneratorReceiver]]
|
|
value : {
|
|
className : global
|
|
description : global
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
}
|
|
[3] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
[4] : {
|
|
name : [[GeneratorLocation]]
|
|
value : {
|
|
description : Object
|
|
subtype : internal#location
|
|
type : object
|
|
value : {
|
|
columnNumber : 13
|
|
lineNumber : 8
|
|
scriptId : <scriptId>
|
|
}
|
|
}
|
|
}
|
|
[5] : {
|
|
name : [[Scopes]]
|
|
value : {
|
|
className : Array
|
|
description : Scopes[2]
|
|
objectId : <objectId>
|
|
subtype : internal#scopeList
|
|
type : object
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
expression: gen1.next();gen1
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[GeneratorStatus]]
|
|
value : {
|
|
type : string
|
|
value : suspended
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[GeneratorFunction]]
|
|
value : {
|
|
className : GeneratorFunction
|
|
description : function* foo() { yield 1; }
|
|
objectId : <objectId>
|
|
type : function
|
|
}
|
|
}
|
|
[2] : {
|
|
name : [[GeneratorReceiver]]
|
|
value : {
|
|
className : global
|
|
description : global
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
}
|
|
[3] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
[4] : {
|
|
name : [[GeneratorLocation]]
|
|
value : {
|
|
description : Object
|
|
subtype : internal#location
|
|
type : object
|
|
value : {
|
|
columnNumber : 2
|
|
lineNumber : 9
|
|
scriptId : <scriptId>
|
|
}
|
|
}
|
|
}
|
|
[5] : {
|
|
name : [[Scopes]]
|
|
value : {
|
|
className : Array
|
|
description : Scopes[2]
|
|
objectId : <objectId>
|
|
subtype : internal#scopeList
|
|
type : object
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
expression: gen1.next();gen1
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[GeneratorStatus]]
|
|
value : {
|
|
type : string
|
|
value : closed
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[GeneratorFunction]]
|
|
value : {
|
|
className : GeneratorFunction
|
|
description : function* foo() { yield 1; }
|
|
objectId : <objectId>
|
|
type : function
|
|
}
|
|
}
|
|
[2] : {
|
|
name : [[GeneratorReceiver]]
|
|
value : {
|
|
className : global
|
|
description : global
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
}
|
|
[3] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
[4] : {
|
|
name : [[GeneratorLocation]]
|
|
value : {
|
|
description : Object
|
|
subtype : internal#location
|
|
type : object
|
|
value : {
|
|
columnNumber : 13
|
|
lineNumber : 8
|
|
scriptId : <scriptId>
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
Running test: generatorObjectDebuggerDisabled
|
|
expression: gen2
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[GeneratorStatus]]
|
|
value : {
|
|
type : string
|
|
value : suspended
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[GeneratorFunction]]
|
|
value : {
|
|
className : GeneratorFunction
|
|
description : function* foo() { yield 1; }
|
|
objectId : <objectId>
|
|
type : function
|
|
}
|
|
}
|
|
[2] : {
|
|
name : [[GeneratorReceiver]]
|
|
value : {
|
|
className : global
|
|
description : global
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
}
|
|
[3] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
[4] : {
|
|
name : [[GeneratorLocation]]
|
|
value : {
|
|
description : Object
|
|
subtype : internal#location
|
|
type : object
|
|
value : {
|
|
columnNumber : 13
|
|
lineNumber : 8
|
|
scriptId : <scriptId>
|
|
}
|
|
}
|
|
}
|
|
[5] : {
|
|
name : [[Scopes]]
|
|
value : {
|
|
className : Array
|
|
description : Scopes[2]
|
|
objectId : <objectId>
|
|
subtype : internal#scopeList
|
|
type : object
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
expression: gen2.next();gen2
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[GeneratorStatus]]
|
|
value : {
|
|
type : string
|
|
value : suspended
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[GeneratorFunction]]
|
|
value : {
|
|
className : GeneratorFunction
|
|
description : function* foo() { yield 1; }
|
|
objectId : <objectId>
|
|
type : function
|
|
}
|
|
}
|
|
[2] : {
|
|
name : [[GeneratorReceiver]]
|
|
value : {
|
|
className : global
|
|
description : global
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
}
|
|
[3] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
[4] : {
|
|
name : [[GeneratorLocation]]
|
|
value : {
|
|
description : Object
|
|
subtype : internal#location
|
|
type : object
|
|
value : {
|
|
columnNumber : 2
|
|
lineNumber : 9
|
|
scriptId : <scriptId>
|
|
}
|
|
}
|
|
}
|
|
[5] : {
|
|
name : [[Scopes]]
|
|
value : {
|
|
className : Array
|
|
description : Scopes[2]
|
|
objectId : <objectId>
|
|
subtype : internal#scopeList
|
|
type : object
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
expression: gen2.next();gen2
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[GeneratorStatus]]
|
|
value : {
|
|
type : string
|
|
value : closed
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[GeneratorFunction]]
|
|
value : {
|
|
className : GeneratorFunction
|
|
description : function* foo() { yield 1; }
|
|
objectId : <objectId>
|
|
type : function
|
|
}
|
|
}
|
|
[2] : {
|
|
name : [[GeneratorReceiver]]
|
|
value : {
|
|
className : global
|
|
description : global
|
|
objectId : <objectId>
|
|
type : object
|
|
}
|
|
}
|
|
[3] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
[4] : {
|
|
name : [[GeneratorLocation]]
|
|
value : {
|
|
description : Object
|
|
subtype : internal#location
|
|
type : object
|
|
value : {
|
|
columnNumber : 13
|
|
lineNumber : 8
|
|
scriptId : <scriptId>
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
Running test: iteratorObject
|
|
expression: (new Map([[1,2]])).entries()
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[IteratorHasMore]]
|
|
value : {
|
|
type : boolean
|
|
value : true
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[IteratorIndex]]
|
|
value : {
|
|
description : 0
|
|
type : number
|
|
value : 0
|
|
}
|
|
}
|
|
[2] : {
|
|
name : [[IteratorKind]]
|
|
value : {
|
|
type : string
|
|
value : entries
|
|
}
|
|
}
|
|
[3] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
[4] : {
|
|
name : [[Entries]]
|
|
value : {
|
|
className : Array
|
|
description : Array(1)
|
|
objectId : <objectId>
|
|
subtype : array
|
|
type : object
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
expression: (new Set([[1,2]])).entries()
|
|
{
|
|
id : <messageId>
|
|
result : {
|
|
internalProperties : [
|
|
[0] : {
|
|
name : [[IteratorHasMore]]
|
|
value : {
|
|
type : boolean
|
|
value : true
|
|
}
|
|
}
|
|
[1] : {
|
|
name : [[IteratorIndex]]
|
|
value : {
|
|
description : 0
|
|
type : number
|
|
value : 0
|
|
}
|
|
}
|
|
[2] : {
|
|
name : [[IteratorKind]]
|
|
value : {
|
|
type : string
|
|
value : entries
|
|
}
|
|
}
|
|
[3] : {
|
|
name : [[StableObjectId]]
|
|
value : <StablectObjectId>
|
|
}
|
|
[4] : {
|
|
name : [[Entries]]
|
|
value : {
|
|
className : Array
|
|
description : Array(1)
|
|
objectId : <objectId>
|
|
subtype : array
|
|
type : object
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|