Commit f4573682 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[inspector] Don't show __proto__ in previews of embedder objects.

This change slipped into https://crrev.com/c/2820970 and wasn't
intended. We actually need to rule out __proto__ here explicitly,
otherwise it starts showing up in previews for embedder objects
(i.e. for HTMLAllCollection, etc.).

Bug: chromium:1197019
Change-Id: Iadde73747c157c2b5b013b11a6b8a30cc4394a7e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831481
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarPhilip Pfaffe <pfaffe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74009}
parent 9313c4ce
...@@ -1304,7 +1304,8 @@ bool ValueMirror::getProperties(v8::Local<v8::Context> context, ...@@ -1304,7 +1304,8 @@ bool ValueMirror::getProperties(v8::Local<v8::Context> context,
bool isSymbolDescription = bool isSymbolDescription =
object->IsSymbol() && name == "description"; object->IsSymbol() && name == "description";
if (isSymbolDescription || if (isSymbolDescription ||
(getterIsNativeFunction && formatAccessorsAsProperties && (name != "__proto__" && getterIsNativeFunction &&
formatAccessorsAsProperties &&
!doesAttributeHaveObservableSideEffectOnGet(context, object, !doesAttributeHaveObservableSideEffectOnGet(context, object,
v8Name))) { v8Name))) {
v8::TryCatch tryCatch(isolate); v8::TryCatch tryCatch(isolate);
......
...@@ -824,11 +824,6 @@ Running test: testObjInheritsGetterProperty ...@@ -824,11 +824,6 @@ Running test: testObjInheritsGetterProperty
type : number type : number
value : NaN value : NaN
} }
[1] : {
name : __proto__
type : object
value : Object
}
] ]
type : object 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