66725a537e
This changes remoteObjectId format from "{injectedScriptId:123,id:456}" to "<isolateId>.<contextId>.<id>". Prepending isolateId fixes the problem that remote object ids clash between processes. This is especially troubling during cross-process navigation in Chromium, see bug. We also stop producing and parsing unnecessary json for object ids. Drive-by: fixed some tests dumping object ids. Most tests avoid dumping unstable values like ids, but there were few that still did. BUG=chromium:1137143 Change-Id: Ia019757fb95704ccb718d3ea6cc54bde1a133382 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2461731 Commit-Queue: Dmitry Gozman <dgozman@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#70592}
84 lines
2.7 KiB
Plaintext
84 lines
2.7 KiB
Plaintext
Test accessing unused private methods at runtime
|
|
|
|
Running test: testScopesPaused
|
|
Get privateProperties of A in testStatic()
|
|
[
|
|
[0] : {
|
|
name : #staticMethod
|
|
value : {
|
|
className : Function
|
|
description : #staticMethod() { return 1; }
|
|
objectId : <objectId>
|
|
type : function
|
|
}
|
|
}
|
|
]
|
|
Access A.#staticMethod() in testStatic()
|
|
{
|
|
exceptionDetails : {
|
|
columnNumber : 0
|
|
exception : {
|
|
className : ReferenceError
|
|
description : ReferenceError: A is not defined at eval (eval at testStatic (:1:1), <anonymous>:1:1) at Function.testStatic (<anonymous>:6:29) at run (<anonymous>:9:7) at <anonymous>:1:1
|
|
objectId : <objectId>
|
|
subtype : error
|
|
type : object
|
|
}
|
|
exceptionId : <exceptionId>
|
|
lineNumber : 0
|
|
scriptId : <scriptId>
|
|
text : Uncaught
|
|
}
|
|
result : {
|
|
className : ReferenceError
|
|
description : ReferenceError: A is not defined at eval (eval at testStatic (:1:1), <anonymous>:1:1) at Function.testStatic (<anonymous>:6:29) at run (<anonymous>:9:7) at <anonymous>:1:1
|
|
objectId : <objectId>
|
|
subtype : error
|
|
type : object
|
|
}
|
|
}
|
|
Access this.#staticMethod() in testStatic()
|
|
{
|
|
exceptionDetails : {
|
|
columnNumber : 0
|
|
exception : {
|
|
className : Error
|
|
description : Error: Unused static private method '#staticMethod' cannot be accessed at debug time at eval (eval at testStatic (:1:1), <anonymous>:1:1) at Function.testStatic (<anonymous>:6:29) at run (<anonymous>:9:7) at <anonymous>:1:1
|
|
objectId : <objectId>
|
|
subtype : error
|
|
type : object
|
|
}
|
|
exceptionId : <exceptionId>
|
|
lineNumber : 0
|
|
scriptId : <scriptId>
|
|
text : Uncaught
|
|
}
|
|
result : {
|
|
className : Error
|
|
description : Error: Unused static private method '#staticMethod' cannot be accessed at debug time at eval (eval at testStatic (:1:1), <anonymous>:1:1) at Function.testStatic (<anonymous>:6:29) at run (<anonymous>:9:7) at <anonymous>:1:1
|
|
objectId : <objectId>
|
|
subtype : error
|
|
type : object
|
|
}
|
|
}
|
|
get privateProperties of a in testInstance()
|
|
[
|
|
[0] : {
|
|
name : #instanceMethod
|
|
value : {
|
|
className : Function
|
|
description : #instanceMethod() { return 2; }
|
|
objectId : <objectId>
|
|
type : function
|
|
}
|
|
}
|
|
]
|
|
Evaluating this.#instanceMethod() in testInstance()
|
|
{
|
|
result : {
|
|
description : 2
|
|
type : number
|
|
value : 2
|
|
}
|
|
}
|