Commit db1baab9 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by V8 LUCI CQ

[inspector] Remove dead code detecting Symbol.description.

The accessor flattening code checks for the "description" property of
Symbols. But the incoming object is a JSReceiver (expressed as
v8::Object on the public API) and thus can never be a Symbol (which is a
primitive value). So this check is always false.

Bug: chromium:1076820
Change-Id: I5190d515cabcfcf052530c251a5ebfe946ae1742
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2991245
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarPhilip Pfaffe <pfaffe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75440}
parent bf096ec9
......@@ -1322,13 +1322,10 @@ bool ValueMirror::getProperties(v8::Local<v8::Context> context,
setterMirror = ValueMirror::create(context, descriptor.set);
}
isAccessorProperty = getterMirror || setterMirror;
bool isSymbolDescription =
object->IsSymbol() && name == "description";
if (isSymbolDescription ||
(name != "__proto__" && getterIsNativeFunction &&
formatAccessorsAsProperties &&
!doesAttributeHaveObservableSideEffectOnGet(context, object,
v8Name))) {
if (name != "__proto__" && getterIsNativeFunction &&
formatAccessorsAsProperties &&
!doesAttributeHaveObservableSideEffectOnGet(context, object,
v8Name)) {
v8::TryCatch tryCatch(isolate);
v8::Local<v8::Value> value;
if (object->Get(context, v8Name).ToLocal(&value)) {
......
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