Commit e13d808c authored by Sathya Gunasekaran's avatar Sathya Gunasekaran Committed by V8 LUCI CQ

Revert "[inspector] Consistently format all native accessors as own properties."

This reverts commit ce8cef36.

Reason for revert: broke blink tests: https://ci.chromium.org/ui/p/chromium/builders/try/mac-rel/751822/overview

Original change's description:
> [inspector] Consistently format all native accessors as own properties.
>
> Previously the V8 inspector would only turn embedder accessors on the
> prototype chain into data properties, but would not do the same for
> ECMAScript builtins, which is kind of inconsistent and weird behavior.
>
> This leaves in the hack that the inspector reports native accessor
> properties as (own) data properties, but now at least the very least
> does so consistently. In the absence of a better solution, we'll go
> with this for now.
>
> Bug: chromium:1076820, chromium:1199247
> Change-Id: I593f909a46cb714dbec629a2944eeb892881ba6f
> Before: https://imgur.com/kPuSldj.png
> After: https://imgur.com/eFau45m.png
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067319
> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#76059}

Bug: chromium:1076820, chromium:1199247
Change-Id: Ib090e0a1dad26f5c9684d906b775555b6a07cca0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3069012Reviewed-by: 's avatarSathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: 's avatarKim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76071}
parent ca73b435
......@@ -1201,6 +1201,8 @@ bool ValueMirror::getProperties(v8::Local<v8::Context> context,
}
}
bool formatAccessorsAsProperties =
clientFor(context)->formatAccessorsAsProperties(object);
auto iterator = v8::debug::PropertyIterator::Create(context, object);
if (!iterator) {
CHECK(tryCatch.HasCaught());
......@@ -1280,7 +1282,8 @@ bool ValueMirror::getProperties(v8::Local<v8::Context> context,
setterMirror = ValueMirror::create(context, descriptor.set);
}
isAccessorProperty = getterMirror || setterMirror;
if (name != "__proto__" && !getterFunction.IsEmpty() &&
if (formatAccessorsAsProperties && name != "__proto__" &&
!getterFunction.IsEmpty() &&
getterFunction->ScriptId() == v8::UnboundScript::kNoScriptId) {
v8::TryCatch tryCatch(isolate);
v8::Local<v8::Value> value;
......
......@@ -74,11 +74,6 @@ expression: (function* foo() { yield 1 })()
Running test: entriesInMapAndSet
expression: new Map([[1,2]])
{
name : size
type : number
value : 1
}
[[Entries]]:
[
[0] : {
......@@ -100,11 +95,6 @@ expression: new Map([[1,2]])
]
expression: new Set([1])
{
name : size
type : number
value : 1
}
[[Entries]]:
[
[0] : {
......
......@@ -121,27 +121,6 @@ Running test: testShortTypedArrayPropertiesPreview
type : number
value : 0
}
[3] : {
name : buffer
subtype : arraybuffer
type : object
value : ArrayBuffer(3)
}
[4] : {
name : byteLength
type : number
value : 3
}
[5] : {
name : byteOffset
type : number
value : 0
}
[6] : {
name : length
type : number
value : 3
}
]
subtype : typedarray
type : object
......@@ -691,11 +670,6 @@ Running test: testSetPropertiesPreview
]
overflow : false
properties : [
[0] : {
name : size
type : number
value : 3
}
]
subtype : set
type : object
......@@ -753,11 +727,6 @@ Running test: testBigSetPropertiesPreview
]
overflow : true
properties : [
[0] : {
name : size
type : number
value : 10
}
]
subtype : set
type : object
......
......@@ -623,11 +623,6 @@ Running test: testMap
description : Map(0)
overflow : false
properties : [
[0] : {
name : size
type : number
value : 0
}
]
subtype : map
type : object
......@@ -664,11 +659,6 @@ Running test: testMap
]
overflow : false
properties : [
[0] : {
name : size
type : number
value : 1
}
]
subtype : map
type : object
......@@ -691,11 +681,6 @@ Running test: testMap
description : Map(1)
overflow : true
properties : [
[0] : {
name : size
type : number
value : 1
}
]
subtype : map
type : object
......@@ -704,11 +689,6 @@ Running test: testMap
description : Map(1)
overflow : true
properties : [
[0] : {
name : size
type : number
value : 1
}
]
subtype : map
type : object
......@@ -717,11 +697,6 @@ Running test: testMap
]
overflow : false
properties : [
[0] : {
name : size
type : number
value : 1
}
]
subtype : map
type : object
......@@ -802,11 +777,6 @@ Running test: testMap
type : number
value : 42
}
[1] : {
name : size
type : number
value : 1
}
]
subtype : map
type : object
......@@ -996,11 +966,6 @@ Running test: testSet
]
overflow : false
properties : [
[0] : {
name : size
type : number
value : 1
}
]
subtype : set
type : object
......@@ -1074,11 +1039,6 @@ Running test: testSet
]
overflow : true
properties : [
[0] : {
name : size
type : number
value : 7
}
]
subtype : set
type : object
......@@ -1768,27 +1728,6 @@ Running test: testTypedArray
type : number
value : 2
}
[3] : {
name : buffer
subtype : arraybuffer
type : object
value : ArrayBuffer(2)
}
[4] : {
name : byteLength
type : number
value : 2
}
[5] : {
name : byteOffset
type : number
value : 0
}
[6] : {
name : length
type : number
value : 2
}
]
subtype : typedarray
type : object
......@@ -2327,11 +2266,6 @@ Running test: testArrayBuffer
description : ArrayBuffer(0)
overflow : false
properties : [
[0] : {
name : byteLength
type : number
value : 0
}
]
subtype : arraybuffer
type : object
......@@ -2350,11 +2284,6 @@ Running test: testArrayBuffer
description : ArrayBuffer(400)
overflow : false
properties : [
[0] : {
name : byteLength
type : number
value : 400
}
]
subtype : arraybuffer
type : object
......@@ -2375,22 +2304,6 @@ Running test: testDataView
description : DataView(16)
overflow : false
properties : [
[0] : {
name : buffer
subtype : arraybuffer
type : object
value : ArrayBuffer(16)
}
[1] : {
name : byteLength
type : number
value : 16
}
[2] : {
name : byteOffset
type : number
value : 0
}
]
subtype : dataview
type : object
......@@ -2409,22 +2322,6 @@ Running test: testDataView
description : DataView(4)
overflow : false
properties : [
[0] : {
name : buffer
subtype : arraybuffer
type : object
value : ArrayBuffer(16)
}
[1] : {
name : byteLength
type : number
value : 4
}
[2] : {
name : byteOffset
type : number
value : 12
}
]
subtype : dataview
type : object
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment