From 2369bade48e77cef68181d0634201f95e791eb83 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Sun, 4 Dec 2022 08:47:22 -0800 Subject: [PATCH] Clean up more cases --- src/bun.js/bindings/bindings.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bun.js/bindings/bindings.cpp b/src/bun.js/bindings/bindings.cpp index 1ea4035230..2da1ebbbbf 100644 --- a/src/bun.js/bindings/bindings.cpp +++ b/src/bun.js/bindings/bindings.cpp @@ -3428,7 +3428,7 @@ restart: return true; } - if (entry.key() == vm.propertyNames->constructor) + if (entry.key() == vm.propertyNames->constructor || entry.key() == vm.propertyNames->length || entry.key() == vm.propertyNames->name || entry.key() == vm.propertyNames->underscoreProto || entry.key() == vm.propertyNames->toStringTagSymbol) return true; if (clientData->builtinNames().bunNativePtrPrivateName() == entry.key()) @@ -3499,12 +3499,12 @@ restart: if (!object->getPropertySlot(globalObject, property, slot)) continue; - if ((slot.attributes() & PropertyAttribute::Accessor) != 0) { - continue; - } - if ((slot.attributes() & PropertyAttribute::DontEnum) != 0) { - if (property == vm.propertyNames->length || property == vm.propertyNames->name || property == vm.propertyNames->underscoreProto) + if ((slot.attributes() & PropertyAttribute::Accessor) != 0) { + continue; + } + + if (property == vm.propertyNames->length || property == vm.propertyNames->name || property == vm.propertyNames->underscoreProto || property == vm.propertyNames->toStringTagSymbol) continue; }