WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-212954-20210102061523.patch (text/plain), 209.87 KB, created by
Alexey Shvayka
on 2021-01-01 20:15:25 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alexey Shvayka
Created:
2021-01-01 20:15:25 PST
Size:
209.87 KB
patch
obsolete
>Index: JSTests/ChangeLog >=================================================================== >--- JSTests/ChangeLog (revision 271117) >+++ JSTests/ChangeLog (working copy) >@@ -1,3 +1,21 @@ >+2021-01-01 Alexey Shvayka <shvaikalesh@gmail.com> >+ >+ [JSC] Simplify get*PropertyNames() methods and EnumerationMode >+ https://bugs.webkit.org/show_bug.cgi?id=212954 >+ >+ Reviewed by Yusuke Suzuki. >+ >+ * ChakraCore.yaml: >+ * ChakraCore/test/Basics/enum.baseline-jsc: Removed. >+ * microbenchmarks/for-in-on-object-with-lazily-materialized-properties.js: >+ Removed because ErrorInstance no longer materializes properties during for/in enumeration. >+ >+ * microbenchmarks/object-keys-cloned-arguments.js: Added. >+ * microbenchmarks/object-keys-error-object.js: Added. >+ * stress/arguments-properties-order.js: Added. >+ * stress/for-in-tests.js: >+ * stress/for-in-typed-array.js: >+ > 2020-12-31 Alexey Shvayka <shvaikalesh@gmail.com> > > JSFunction::deleteProperty() fails to delete a non-existent "prototype" property >Index: JSTests/ChakraCore.yaml >=================================================================== >--- JSTests/ChakraCore.yaml (revision 271116) >+++ JSTests/ChakraCore.yaml (working copy) >@@ -303,7 +303,7 @@ > - path: ChakraCore/test/Basics/scan.js > cmd: runChakra :baseline, "NoException", "scan.baseline-jsc", [] > - path: ChakraCore/test/Basics/enum.js >- cmd: runChakra :baseline, "NoException", "enum.baseline-jsc", [] >+ cmd: runChakra :pass, "NoException", "", [] > - path: ChakraCore/test/Basics/with3.js > cmd: runChakra :baseline, "NoException", "with3.baseline-jsc", [] > - path: ChakraCore/test/Basics/cross_site_accessor_main.js >Index: JSTests/ChakraCore/test/Basics/enum.baseline-jsc >=================================================================== >--- JSTests/ChakraCore/test/Basics/enum.baseline-jsc (revision 271116) >+++ JSTests/ChakraCore/test/Basics/enum.baseline-jsc (nonexistent) >@@ -1,117 +0,0 @@ >-x:a.x >-q:a.q >-u:a.q >-z:f.p.z >-r:f.p.r >-y:o.p.y >-Object a >-x >-y >-u >-z >-Math >-u >-x >-y >-z >-Array >-u >-x >-y >-z >-Array.prototype >-u >-x >-y >-z >-Date >-u >-x >-y >-z >-Number >-u >-x >-y >-z >-String >-u >-x >-y >-z >-Object.prototype >-u >-x >-y >-z >-Object >-u >-x >-y >-z >-Array.prototype.sort >-u >-x >-y >-z >-function foo >-u >-x >-y >-z >-x >-u >-y >-z >-me here >-prototype chain >-u >-x >-y >-z >-Literal String >-0 >-1 >-2 >-3 >-4 >-5 >-6 >-7 >-8 >-9 >-zz >-u >-x >-y >-z >-String Object >-xx >-yy >-0 >-1 >-2 >-3 >-4 >-5 >-6 >-7 >-8 >-9 >-10 >-11 >-zz >-u >-x >-y >-z >-5 >-u >-x >-y >-z >-3 >-u >-x >-y >-z >Index: JSTests/microbenchmarks/for-in-on-object-with-lazily-materialized-properties.js >=================================================================== >--- JSTests/microbenchmarks/for-in-on-object-with-lazily-materialized-properties.js (revision 271116) >+++ JSTests/microbenchmarks/for-in-on-object-with-lazily-materialized-properties.js (nonexistent) >@@ -1,15 +0,0 @@ >-//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py >-function foo(o) { >- var count = 0; >- for (var p in o) { >- if (o[p]) >- count ++; >- } >- return count; >-} >-noInline(foo); >- >-var total = 0; >-for (let j = 0; j < 100000; ++j) >- total += foo(new Error); >- >Index: JSTests/microbenchmarks/object-keys-cloned-arguments.js >=================================================================== >--- JSTests/microbenchmarks/object-keys-cloned-arguments.js (nonexistent) >+++ JSTests/microbenchmarks/object-keys-cloned-arguments.js (working copy) >@@ -0,0 +1,9 @@ >+noInline(Object.keys); >+ >+function getArgs(a, b, c) { >+ "use strict"; >+ return arguments; >+} >+ >+for (var i = 0; i < 2e5; ++i) >+ Object.keys(getArgs(1, 2, 3)); >Index: JSTests/microbenchmarks/object-keys-error-object.js >=================================================================== >--- JSTests/microbenchmarks/object-keys-error-object.js (nonexistent) >+++ JSTests/microbenchmarks/object-keys-error-object.js (working copy) >@@ -0,0 +1,4 @@ >+noInline(Object.keys); >+ >+for (var i = 0; i < 2e5; ++i) >+ Object.keys(new Error()); >Index: JSTests/stress/arguments-properties-order.js >=================================================================== >--- JSTests/stress/arguments-properties-order.js (nonexistent) >+++ JSTests/stress/arguments-properties-order.js (working copy) >@@ -0,0 +1,79 @@ >+function getMappedArguments(a, b) { return arguments; } >+function getUnmappedArguments(a, b) { "use strict"; return arguments; } >+ >+function shouldBeArray(actual, expected) { >+ var isEqual = >+ actual.length === expected.length && >+ actual.every((item, index) => item === expected[index]); >+ if (!isEqual) >+ throw new Error(`Expected [${actual.map(String)}] to equal [${expected.map(String)}]`); >+} >+ >+function forIn(object) { >+ var keys = []; >+ for (var key in object) >+ keys.push(key); >+ return keys; >+} >+ >+noInline(getMappedArguments); >+noInline(getUnmappedArguments); >+noInline(forIn); >+ >+(function() { >+ for (var i = 0; i < 1e4; ++i) { >+ var mappedArguments = getMappedArguments(0, 1, 2); >+ shouldBeArray(forIn(mappedArguments), ["0", "1", "2"]); >+ shouldBeArray(Object.keys(mappedArguments), ["0", "1", "2"]); >+ shouldBeArray(Reflect.ownKeys(mappedArguments), ["0", "1", "2", "length", "callee", Symbol.iterator]); >+ >+ var unmappedArguments = getUnmappedArguments(0); >+ shouldBeArray(forIn(unmappedArguments), ["0"]); >+ shouldBeArray(Object.keys(unmappedArguments), ["0"]); >+ shouldBeArray(Reflect.ownKeys(unmappedArguments), ["0", "length", "callee", Symbol.iterator]); >+ } >+})(); >+ >+(function() { >+ for (var i = 0; i < 1e4; ++i) { >+ var mappedArguments = getMappedArguments(0, 1); >+ mappedArguments[8] = 8; >+ mappedArguments[2] = 2; >+ shouldBeArray(forIn(mappedArguments), ["0", "1", "2", "8"]); >+ shouldBeArray(Object.keys(mappedArguments), ["0", "1", "2", "8"]); >+ shouldBeArray(Reflect.ownKeys(mappedArguments), ["0", "1", "2", "8", "length", "callee", Symbol.iterator]); >+ >+ var unmappedArguments = getUnmappedArguments(); >+ unmappedArguments[12] = 12; >+ unmappedArguments[3] = 3; >+ shouldBeArray(forIn(unmappedArguments), ["3", "12"]); >+ shouldBeArray(Object.keys(unmappedArguments), ["3", "12"]); >+ shouldBeArray(Reflect.ownKeys(unmappedArguments), ["3", "12", "length", "callee", Symbol.iterator]); >+ } >+})(); >+ >+(function() { >+ for (var i = 0; i < 1e4; ++i) { >+ var mappedArguments = getMappedArguments(0); >+ mappedArguments.foo = 1; >+ mappedArguments.bar = 2; >+ shouldBeArray(forIn(mappedArguments), ["0", "foo", "bar"]); >+ shouldBeArray(Object.keys(mappedArguments), ["0", "foo", "bar"]); >+ // FIXME: Symbol.iterator should come after "foo" and "bar" >+ // shouldBeArray(Reflect.ownKeys(mappedArguments), ["0", "length", "callee", "foo", "bar", Symbol.iterator]); >+ >+ var unmappedArguments = getUnmappedArguments(0, 1, 2); >+ unmappedArguments.foo = 1; >+ unmappedArguments.bar = 2; >+ shouldBeArray(forIn(unmappedArguments), ["0", "1", "2", "foo", "bar"]); >+ shouldBeArray(Object.keys(unmappedArguments), ["0", "1", "2", "foo", "bar"]); >+ // FIXME: "callee" should come before "foo" and "bar" >+ // shouldBeArray(Reflect.ownKeys(unmappedArguments), ["0", "1", "2", "length", "callee", "foo", "bar", Symbol.iterator]); >+ } >+})(); >+ >+// FIXME: Add more tests, covering: >+// * added symbol properties; >+// * added together index, non-index, and symbol properties; >+// * deleted, re-added, and redefined as DontEnum index properties, both within and beyond "length"; >+// * deleted, re-added, and redefined as DontEnum "length", "callee", and Symbol.iterator properties. >Index: JSTests/stress/for-in-tests.js >=================================================================== >--- JSTests/stress/for-in-tests.js (revision 271116) >+++ JSTests/stress/for-in-tests.js (working copy) >@@ -88,6 +88,24 @@ function shouldThrowSyntaxError(script) > foo(null); > })(); > (function() { >+ // Iterate over an object with non-reified static property names & structure property >+ if (typeof WebAssembly === "undefined") >+ return; >+ >+ WebAssembly.foo = 1; >+ >+ function forIn() { >+ for (var key in WebAssembly) {} >+ return key; >+ } >+ noInline(forIn); >+ >+ for (var i = 0; i < 10000; ++i) { >+ if (forIn() !== "foo") >+ throw new Error("bad result"); >+ } >+})(); >+(function() { > var foo = function(a, b) { > for (var p in b) { > var f1 = a[p]; >Index: JSTests/stress/for-in-typed-array.js >=================================================================== >--- JSTests/stress/for-in-typed-array.js (revision 271116) >+++ JSTests/stress/for-in-typed-array.js (working copy) >@@ -16,3 +16,25 @@ > } > foo(null); > })(); >+ >+(function() { >+ function forIn() { >+ var a = new Int32Array(4); >+ a.foo = 1; >+ a.bar = 2; >+ for (var i = 0; i < a.length; ++i) >+ a[i] = i; >+ >+ var keys = []; >+ for (var k in a) >+ keys.push(k); >+ return keys.join("|"); >+ } >+ noInline(forIn); >+ >+ for (var i = 0; i < 1e4; ++i) { >+ var keys = forIn(); >+ if (keys !== "0|1|2|3|foo|bar") >+ throw new Error(`Bad result: ${keys}`); >+ } >+})(); >Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 271117) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,219 @@ >+2021-01-01 Alexey Shvayka <shvaikalesh@gmail.com> >+ >+ [JSC] Simplify get*PropertyNames() methods and EnumerationMode >+ https://bugs.webkit.org/show_bug.cgi?id=212954 >+ >+ Reviewed by Yusuke Suzuki. >+ >+ Before this change, [[OwnPropertyKeys]] overrides were sometimes implemented >+ inconsistently, via different get*PropertyNames() methods that duplicated logic >+ (e.g. ErrorInstance, RegExpObject, and StringObject). >+ >+ This patch: >+ >+ 1. Introduces a clear convention to implement [[OwnPropertyKeys]] overrides: >+ if it's defined by the spec, getOwnPropertyNames() method is used; otherwise, >+ non-materialized properties are enumerated / reified in getOwnSpecialPropertyNames(). >+ While no class should define both methods, we don't assert this to support inheritance. >+ >+ Removes getOwnNonIndexPropertyNames() from the method table and converts it to instance >+ method; its overrides were renamed to getOwnSpecialPropertyNames() and exempted from >+ calling the no-op base method. >+ >+ This approach was chosen, instead of getOwnNonIndexPropertyNames() override, because >+ for/in enumeration must be sure there are no enumerable properties between >+ getEnumerableLength() and the first structure property. >+ >+ Also, removes getStructurePropertyNames() from the method table as it's unreasonable >+ to override it. >+ >+ 2. Extracts JSObject::getOwnIndexPropertyNames() instance method to enforce >+ correct enumeration order in getOwnPropertyNames() overrides: special indices => >+ butterfly storage => special properties => non-reified static => structure properties. >+ >+ Loose mode `arguments` were fixed to enumerate indices from butterfly storage before >+ special properties [1], aligning JSC with V8 and SpiderMonkey. >+ >+ 3. Reworks for/in enumeration so the special properties always come before structure ones, >+ aligning enumeration order of String objects [2] and typed arrays [3] that have expando >+ properties with the spec, V8, and SpiderMonkey. >+ >+ Removes getPropertyNames() and getGenericPropertyNames() from the method table, along >+ with their overrides, because ES7 disabled customization of for/in enumeration [4]. >+ Instead, JSObject::getPropertyNames() instance method and getEnumerablePropertyNames() >+ are introduced, featuring a loop instead of recursion. >+ >+ Also, this enabled dropping hard-to-follow JSObjectPropertiesMode bit and simplifying >+ EnumerationMode to an enum. >+ >+ for/in and Object.keys microbenchmarks are neutral. This change does not affect >+ JSPropertyNameEnumerator caching, nor fast paths of its bytecodes. >+ >+ [1]: https://tc39.es/ecma262/#sec-createmappedargumentsobject (steps 15-16 and 20-21) >+ [2]: https://tc39.es/ecma262/#sec-string-exotic-objects-ownpropertykeys >+ [3]: https://tc39.es/ecma262/#sec-integer-indexed-exotic-objects-ownpropertykeys >+ [4]: https://github.com/tc39/ecma262/pull/367 >+ >+ * API/JSAPIValueWrapper.h: >+ Remove OverridesAnyFormOfGetPropertyNames structure flag as it should never be queried >+ from JSCell instances. >+ >+ * API/JSCallbackObject.h: >+ * API/JSCallbackObjectFunctions.h: >+ (JSC::JSCallbackObject<Parent>::getOwnSpecialPropertyNames): >+ (JSC::JSCallbackObject<Parent>::getOwnNonIndexPropertyNames): Deleted. >+ * API/JSObjectRef.cpp: >+ (JSObjectCopyPropertyNames): >+ * bindings/ScriptValue.cpp: >+ (Inspector::jsToInspectorValue): >+ * bytecode/ObjectAllocationProfileInlines.h: >+ (JSC::ObjectAllocationProfileBase<Derived>::possibleDefaultPropertyCount): >+ Use DontEnumPropertyMode::Include as the intent is to count all properties, even >+ private symbols. EnumerationMode() defaults did exclude non-enumerable properties. >+ >+ * debugger/DebuggerScope.cpp: >+ (JSC::DebuggerScope::getOwnPropertyNames): >+ * debugger/DebuggerScope.h: >+ * runtime/ClassInfo.h: >+ * runtime/ClonedArguments.cpp: >+ (JSC::ClonedArguments::getOwnSpecialPropertyNames): >+ Don't materialize DontEnum properties unless it's DontEnumPropertiesMode::Include, >+ advancing provided microbenchmark by ~23%. >+ >+ (JSC::ClonedArguments::getOwnPropertyNames): Deleted. >+ * runtime/ClonedArguments.h: >+ * runtime/EnumerationMode.h: >+ Explicitly specify enum type to reduce its size. >+ >+ (JSC::EnumerationMode::EnumerationMode): Deleted. >+ (JSC::EnumerationMode::includeDontEnumProperties): Deleted. >+ (JSC::EnumerationMode::includeJSObjectProperties): Deleted. >+ * runtime/ErrorInstance.cpp: >+ (JSC::ErrorInstance::getOwnSpecialPropertyNames): >+ Don't materialize DontEnum properties unless it's DontEnumPropertiesMode::Include, >+ advancing provided microbenchmark by a factor of 5. >+ >+ (JSC::ErrorInstance::getOwnNonIndexPropertyNames): Deleted. >+ (JSC::ErrorInstance::getStructurePropertyNames): Deleted. >+ * runtime/ErrorInstance.h: >+ * runtime/GenericArguments.h: >+ * runtime/GenericArgumentsInlines.h: >+ (JSC::GenericArguments<Type>::getOwnPropertyNames): >+ * runtime/JSArray.cpp: >+ (JSC::JSArray::getOwnSpecialPropertyNames): >+ (JSC::JSArray::getOwnNonIndexPropertyNames): Deleted. >+ * runtime/JSArray.h: >+ * runtime/JSCell.cpp: >+ (JSC::JSCell::getOwnPropertyNames): >+ (JSC::JSCell::getOwnSpecialPropertyNames): >+ (JSC::JSCell::getOwnNonIndexPropertyNames): Deleted. >+ (JSC::JSCell::getPropertyNames): Deleted. >+ (JSC::JSCell::getStructurePropertyNames): Deleted. >+ (JSC::JSCell::getGenericPropertyNames): Deleted. >+ * runtime/JSCell.h: >+ * runtime/JSFunction.cpp: >+ (JSC::JSFunction::getOwnSpecialPropertyNames): >+ (JSC::JSFunction::getOwnNonIndexPropertyNames): Deleted. >+ * runtime/JSFunction.h: >+ * runtime/JSGenericTypedArrayView.h: >+ * runtime/JSGenericTypedArrayViewInlines.h: >+ (JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertyNames): >+ * runtime/JSGlobalObject.h: >+ Remove OverridesAnyFormOfGetPropertyNames structure flag as it's inherited from >+ JSSymbolTableObject, and JSGlobalObject itself doesn't override getOwn*PropertyNames(). >+ >+ * runtime/JSLexicalEnvironment.cpp: >+ (JSC::JSLexicalEnvironment::getOwnSpecialPropertyNames): >+ (JSC::JSLexicalEnvironment::getOwnNonIndexPropertyNames): Deleted. >+ * runtime/JSLexicalEnvironment.h: >+ * runtime/JSModuleEnvironment.cpp: >+ (JSC::JSModuleEnvironment::getOwnSpecialPropertyNames): >+ (JSC::JSModuleEnvironment::getOwnNonIndexPropertyNames): Deleted. >+ * runtime/JSModuleEnvironment.h: >+ * runtime/JSModuleNamespaceObject.cpp: >+ (JSC::JSModuleNamespaceObject::getOwnPropertyNames): >+ Call getOwnNonIndexPropertyNames() directly, guarded by includeSymbolProperties() check, >+ since module namespace objects can't have string properties besides m_names. >+ (See https://tc39.es/ecma262/#sec-module-namespace-exotic-objects-defineownproperty-p-desc) >+ >+ * runtime/JSModuleNamespaceObject.h: >+ * runtime/JSONObject.cpp: >+ (JSC::Stringifier::Holder::appendNextProperty): >+ (JSC::Walker::walk): >+ * runtime/JSObject.cpp: >+ (JSC::JSObject::getNonReifiedStaticPropertyNames): >+ (JSC::JSObject::getPropertyNames): >+ (JSC::JSObject::getOwnPropertyNames): >+ (JSC::JSObject::getOwnSpecialPropertyNames): >+ (JSC::JSObject::getOwnIndexedPropertyNames): >+ (JSC::JSObject::getOwnNonIndexPropertyNames): >+ (JSC::getClassPropertyNames): Deleted. >+ (JSC::JSObject::getStructurePropertyNames): Deleted. >+ (JSC::JSObject::getGenericPropertyNames): Deleted. >+ * runtime/JSObject.h: >+ (JSC::JSObject::getOwnSpecialPropertyNames): >+ * runtime/JSPropertyNameEnumerator.cpp: >+ (JSC::getEnumerablePropertyNames): >+ * runtime/JSPropertyNameEnumerator.h: >+ (JSC::propertyNameEnumerator): >+ * runtime/JSProxy.cpp: >+ (JSC::JSProxy::getOwnPropertyNames): >+ (JSC::JSProxy::getPropertyNames): Deleted. >+ (JSC::JSProxy::getStructurePropertyNames): Deleted. >+ (JSC::JSProxy::getGenericPropertyNames): Deleted. >+ * runtime/JSProxy.h: >+ * runtime/JSSymbolTableObject.cpp: >+ (JSC::JSSymbolTableObject::getOwnSpecialPropertyNames): >+ (JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames): Deleted. >+ * runtime/JSSymbolTableObject.h: >+ * runtime/JSTypeInfo.h: >+ (JSC::TypeInfo::overridesGetOwnPropertyNames const): >+ (JSC::TypeInfo::overridesGetOwnSpecialPropertyNames const): >+ (JSC::TypeInfo::overridesAnyFormOfGetOwnPropertyNames const): >+ (JSC::TypeInfo::overridesGetPropertyNames const): Deleted. >+ (JSC::TypeInfo::overridesAnyFormOfGetPropertyNames const): Deleted. >+ * runtime/ObjectConstructor.cpp: >+ (JSC::objectConstructorGetOwnPropertyDescriptors): >+ (JSC::JSC_DEFINE_HOST_FUNCTION): >+ (JSC::defineProperties): >+ (JSC::setIntegrityLevel): >+ (JSC::testIntegrityLevel): >+ (JSC::ownPropertyKeys): >+ * runtime/ProxyObject.cpp: >+ (JSC::ProxyObject::performGetOwnPropertyNames): >+ (JSC::ProxyObject::getOwnPropertyNames): >+ (JSC::ProxyObject::getPropertyNames): Deleted. >+ (JSC::ProxyObject::getOwnNonIndexPropertyNames): Deleted. >+ (JSC::ProxyObject::getStructurePropertyNames): Deleted. >+ (JSC::ProxyObject::getGenericPropertyNames): Deleted. >+ * runtime/ProxyObject.h: >+ Remove IsQuickPropertyAccessAllowedForEnumeration flag from ProxyObject's structure >+ since canAccessPropertiesQuicklyForEnumeration() now checks for method overrides. >+ >+ * runtime/RegExpObject.cpp: >+ (JSC::RegExpObject::getOwnSpecialPropertyNames): >+ (JSC::RegExpObject::getOwnNonIndexPropertyNames): Deleted. >+ (JSC::RegExpObject::getPropertyNames): Deleted. >+ (JSC::RegExpObject::getGenericPropertyNames): Deleted. >+ * runtime/RegExpObject.h: >+ * runtime/StringObject.cpp: >+ (JSC::StringObject::getOwnPropertyNames): >+ (JSC::StringObject::getOwnNonIndexPropertyNames): Deleted. >+ * runtime/StringObject.h: >+ * runtime/Structure.cpp: >+ (JSC::Structure::validateFlags): >+ Strengthen overridesGetOwn*PropertyNames and overridesGetPrototype asserts into >+ equivalence tests. >+ >+ (JSC::Structure::getPropertyNamesFromStructure): >+ (JSC::Structure::canAccessPropertiesQuicklyForEnumeration const): >+ * runtime/Structure.h: >+ * runtime/StructureInlines.h: >+ (JSC::Structure::canCacheOwnPropertyNames const): >+ * tools/JSDollarVM.cpp: >+ Remove OverridesAnyFormOfGetPropertyNames structure flag as it's inherited from >+ JSArray, and RuntimeArray itself doesn't override getOwn*PropertyNames(). >+ > 2020-12-31 Alexey Shvayka <shvaikalesh@gmail.com> > > JSFunction::deleteProperty() fails to delete a non-existent "prototype" property >Index: Source/JavaScriptCore/API/JSAPIValueWrapper.h >=================================================================== >--- Source/JavaScriptCore/API/JSAPIValueWrapper.h (revision 271116) >+++ Source/JavaScriptCore/API/JSAPIValueWrapper.h (working copy) >@@ -33,13 +33,7 @@ class JSAPIValueWrapper final : public J > friend JSValue jsAPIValueWrapper(JSGlobalObject*, JSValue); > public: > using Base = JSCell; >- >- // OverridesAnyFormOfGetPropertyNames (which used to be OverridesGetPropertyNames) was here >- // since ancient times back when we pessimistically choose to apply this flag. I think we >- // can remove it, but we should do more testing before we do so. >- // Ref: http://trac.webkit.org/changeset/49694/webkit#file9 >- // FIXME: https://bugs.webkit.org/show_bug.cgi?id=212954 >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesAnyFormOfGetPropertyNames | StructureIsImmortal; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal; > > template<typename CellType, SubspaceAccess mode> > static IsoSubspace* subspaceFor(VM& vm) >Index: Source/JavaScriptCore/API/JSCallbackObject.h >=================================================================== >--- Source/JavaScriptCore/API/JSCallbackObject.h (revision 271116) >+++ Source/JavaScriptCore/API/JSCallbackObject.h (working copy) >@@ -125,7 +125,7 @@ template <class Parent> > class JSCallbackObject final : public Parent { > public: > using Base = Parent; >- static constexpr unsigned StructureFlags = Base::StructureFlags | ProhibitsPropertyCaching | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | ImplementsHasInstance | OverridesAnyFormOfGetPropertyNames | OverridesGetCallData; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnSpecialPropertyNames | OverridesGetCallData | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | ImplementsHasInstance | ProhibitsPropertyCaching; > static_assert(!(StructureFlags & ImplementsDefaultHasInstance), "using customHasInstance"); > > ~JSCallbackObject(); >@@ -211,7 +211,7 @@ private: > > static bool customHasInstance(JSObject*, JSGlobalObject*, JSValue); > >- static void getOwnNonIndexPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ static void getOwnSpecialPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > > static CallData getConstructData(JSCell*); > static CallData getCallData(JSCell*); >Index: Source/JavaScriptCore/API/JSCallbackObjectFunctions.h >=================================================================== >--- Source/JavaScriptCore/API/JSCallbackObjectFunctions.h (revision 271116) >+++ Source/JavaScriptCore/API/JSCallbackObjectFunctions.h (working copy) >@@ -569,7 +569,7 @@ EncodedJSValue JSCallbackObject<Parent>: > } > > template <class Parent> >-void JSCallbackObject<Parent>::getOwnNonIndexPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSCallbackObject<Parent>::getOwnSpecialPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = getVM(globalObject); > JSCallbackObject* thisObject = jsCast<JSCallbackObject*>(object); >@@ -588,7 +588,7 @@ void JSCallbackObject<Parent>::getOwnNon > for (iterator it = staticValues->begin(); it != end; ++it) { > StringImpl* name = it->key.get(); > StaticValueEntry* entry = it->value.get(); >- if (entry->getProperty && (!(entry->attributes & kJSPropertyAttributeDontEnum) || mode.includeDontEnumProperties())) { >+ if (entry->getProperty && (mode == DontEnumPropertiesMode::Include || !(entry->attributes & kJSPropertyAttributeDontEnum))) { > ASSERT(!name->isSymbol()); > propertyNames.add(Identifier::fromString(vm, String(name))); > } >@@ -601,15 +601,13 @@ void JSCallbackObject<Parent>::getOwnNon > for (iterator it = staticFunctions->begin(); it != end; ++it) { > StringImpl* name = it->key.get(); > StaticFunctionEntry* entry = it->value.get(); >- if (!(entry->attributes & kJSPropertyAttributeDontEnum) || mode.includeDontEnumProperties()) { >+ if (mode == DontEnumPropertiesMode::Include || !(entry->attributes & kJSPropertyAttributeDontEnum)) { > ASSERT(!name->isSymbol()); > propertyNames.add(Identifier::fromString(vm, String(name))); > } > } > } > } >- >- Parent::getOwnNonIndexPropertyNames(thisObject, globalObject, propertyNames, mode); > } > > template <class Parent> >Index: Source/JavaScriptCore/API/JSObjectRef.cpp >=================================================================== >--- Source/JavaScriptCore/API/JSObjectRef.cpp (revision 271116) >+++ Source/JavaScriptCore/API/JSObjectRef.cpp (working copy) >@@ -808,7 +808,7 @@ JSPropertyNameArrayRef JSObjectCopyPrope > JSObject* jsObject = toJS(object); > JSPropertyNameArrayRef propertyNames = new OpaqueJSPropertyNameArray(&vm); > PropertyNameArray array(vm, PropertyNameMode::Strings, PrivateSymbolMode::Exclude); >- jsObject->methodTable(vm)->getPropertyNames(jsObject, globalObject, array, EnumerationMode()); >+ jsObject->getPropertyNames(globalObject, array, DontEnumPropertiesMode::Exclude); > > size_t size = array.size(); > propertyNames->array.reserveInitialCapacity(size); >Index: Source/JavaScriptCore/bindings/ScriptValue.cpp >=================================================================== >--- Source/JavaScriptCore/bindings/ScriptValue.cpp (revision 271116) >+++ Source/JavaScriptCore/bindings/ScriptValue.cpp (working copy) >@@ -77,7 +77,7 @@ static RefPtr<JSON::Value> jsToInspector > auto inspectorObject = JSON::Object::create(); > auto& object = *value.getObject(); > PropertyNameArray propertyNames(vm, PropertyNameMode::Strings, PrivateSymbolMode::Exclude); >- object.methodTable(vm)->getOwnPropertyNames(&object, globalObject, propertyNames, EnumerationMode()); >+ object.methodTable(vm)->getOwnPropertyNames(&object, globalObject, propertyNames, DontEnumPropertiesMode::Exclude); > for (auto& name : propertyNames) { > auto inspectorValue = jsToInspectorValue(globalObject, object.get(globalObject, name), maxDepth); > if (!inspectorValue) >Index: Source/JavaScriptCore/bytecode/ObjectAllocationProfileInlines.h >=================================================================== >--- Source/JavaScriptCore/bytecode/ObjectAllocationProfileInlines.h (revision 271116) >+++ Source/JavaScriptCore/bytecode/ObjectAllocationProfileInlines.h (working copy) >@@ -147,7 +147,7 @@ ALWAYS_INLINE unsigned ObjectAllocationP > > size_t count = 0; > PropertyNameArray propertyNameArray(vm, PropertyNameMode::StringsAndSymbols, PrivateSymbolMode::Include); >- prototype->structure(vm)->getPropertyNamesFromStructure(vm, propertyNameArray, EnumerationMode()); >+ prototype->structure(vm)->getPropertyNamesFromStructure(vm, propertyNameArray, DontEnumPropertiesMode::Include); > PropertyNameArrayData::PropertyNameVector& propertyNameVector = propertyNameArray.data()->propertyNameVector(); > for (size_t i = 0; i < propertyNameVector.size(); ++i) { > JSValue value = prototype->getDirect(vm, propertyNameVector[i]); >Index: Source/JavaScriptCore/debugger/DebuggerScope.cpp >=================================================================== >--- Source/JavaScriptCore/debugger/DebuggerScope.cpp (revision 271116) >+++ Source/JavaScriptCore/debugger/DebuggerScope.cpp (working copy) >@@ -138,14 +138,14 @@ bool DebuggerScope::deleteProperty(JSCel > return thisObject->methodTable(globalObject->vm())->deleteProperty(thisObject, globalObject, propertyName, slot); > } > >-void DebuggerScope::getOwnPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void DebuggerScope::getOwnPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > DebuggerScope* scope = jsCast<DebuggerScope*>(object); > ASSERT(scope->isValid()); > if (!scope->isValid()) > return; > JSObject* thisObject = JSScope::objectAtScope(scope->jsScope()); >- thisObject->methodTable(globalObject->vm())->getPropertyNames(thisObject, globalObject, propertyNames, mode); >+ thisObject->getPropertyNames(globalObject, propertyNames, mode); > } > > bool DebuggerScope::defineOwnProperty(JSObject* object, JSGlobalObject* globalObject, PropertyName propertyName, const PropertyDescriptor& descriptor, bool shouldThrow) >Index: Source/JavaScriptCore/debugger/DebuggerScope.h >=================================================================== >--- Source/JavaScriptCore/debugger/DebuggerScope.h (revision 271116) >+++ Source/JavaScriptCore/debugger/DebuggerScope.h (working copy) >@@ -36,7 +36,7 @@ class JSScope; > class DebuggerScope final : public JSNonFinalObject { > public: > using Base = JSNonFinalObject; >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnPropertyNames; > > template<typename CellType, SubspaceAccess mode> > static IsoSubspace* subspaceFor(VM& vm) >@@ -52,7 +52,7 @@ public: > static bool getOwnPropertySlot(JSObject*, JSGlobalObject*, PropertyName, PropertySlot&); > static bool put(JSCell*, JSGlobalObject*, PropertyName, JSValue, PutPropertySlot&); > static bool deleteProperty(JSCell*, JSGlobalObject*, PropertyName, DeletePropertySlot&); >- static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > static bool defineOwnProperty(JSObject*, JSGlobalObject*, PropertyName, const PropertyDescriptor&, bool shouldThrow); > > DECLARE_EXPORT_INFO; >Index: Source/JavaScriptCore/runtime/ClassInfo.h >=================================================================== >--- Source/JavaScriptCore/runtime/ClassInfo.h (revision 271116) >+++ Source/JavaScriptCore/runtime/ClassInfo.h (working copy) >@@ -80,21 +80,13 @@ struct MethodTable { > using DefaultValueFunctionPtr = JSValue (*)(const JSObject*, JSGlobalObject*, PreferredPrimitiveType); > DefaultValueFunctionPtr METHOD_TABLE_ENTRY(defaultValue); > >- using GetOwnPropertyNamesFunctionPtr = void (*)(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ using GetOwnPropertyNamesFunctionPtr = void (*)(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > GetOwnPropertyNamesFunctionPtr METHOD_TABLE_ENTRY(getOwnPropertyNames); >- >- using GetOwnNonIndexPropertyNamesFunctionPtr = void (*)(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- GetOwnNonIndexPropertyNamesFunctionPtr METHOD_TABLE_ENTRY(getOwnNonIndexPropertyNames); >- >- using GetPropertyNamesFunctionPtr = void (*)(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- GetPropertyNamesFunctionPtr METHOD_TABLE_ENTRY(getPropertyNames); >+ GetOwnPropertyNamesFunctionPtr METHOD_TABLE_ENTRY(getOwnSpecialPropertyNames); > > using GetEnumerableLengthFunctionPtr = uint32_t (*)(JSGlobalObject*, JSObject*); > GetEnumerableLengthFunctionPtr METHOD_TABLE_ENTRY(getEnumerableLength); > >- GetPropertyNamesFunctionPtr METHOD_TABLE_ENTRY(getStructurePropertyNames); >- GetPropertyNamesFunctionPtr METHOD_TABLE_ENTRY(getGenericPropertyNames); >- > using ClassNameFunctionPtr = String (*)(const JSObject*, VM&); > ClassNameFunctionPtr METHOD_TABLE_ENTRY(className); > >@@ -168,11 +160,8 @@ struct MethodTable { > &ClassName::toThis, \ > &ClassName::defaultValue, \ > &ClassName::getOwnPropertyNames, \ >- &ClassName::getOwnNonIndexPropertyNames, \ >- &ClassName::getPropertyNames, \ >+ &ClassName::getOwnSpecialPropertyNames, \ > &ClassName::getEnumerableLength, \ >- &ClassName::getStructurePropertyNames, \ >- &ClassName::getGenericPropertyNames, \ > &ClassName::className, \ > &ClassName::toStringName, \ > &ClassName::customHasInstance, \ >Index: Source/JavaScriptCore/runtime/ClonedArguments.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/ClonedArguments.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/ClonedArguments.cpp (working copy) >@@ -197,11 +197,11 @@ bool ClonedArguments::getOwnPropertySlot > return Base::getOwnPropertySlot(thisObject, globalObject, ident, slot); > } > >-void ClonedArguments::getOwnPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& array, EnumerationMode mode) >+void ClonedArguments::getOwnSpecialPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray&, DontEnumPropertiesMode mode) > { > ClonedArguments* thisObject = jsCast<ClonedArguments*>(object); >- thisObject->materializeSpecialsIfNecessary(globalObject); >- Base::getOwnPropertyNames(thisObject, globalObject, array, mode); >+ if (mode == DontEnumPropertiesMode::Include) >+ thisObject->materializeSpecialsIfNecessary(globalObject); > } > > bool ClonedArguments::put(JSCell* cell, JSGlobalObject* globalObject, PropertyName ident, JSValue value, PutPropertySlot& slot) >Index: Source/JavaScriptCore/runtime/ClonedArguments.h >=================================================================== >--- Source/JavaScriptCore/runtime/ClonedArguments.h (revision 271116) >+++ Source/JavaScriptCore/runtime/ClonedArguments.h (working copy) >@@ -40,7 +40,7 @@ namespace JSC { > class ClonedArguments final : public JSNonFinalObject { > public: > using Base = JSNonFinalObject; >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnSpecialPropertyNames; > > template<typename CellType, SubspaceAccess mode> > static IsoSubspace* subspaceFor(VM& vm) >@@ -70,7 +70,7 @@ private: > static Structure* createStructure(VM&, JSGlobalObject*, JSValue prototype, IndexingType); > > static bool getOwnPropertySlot(JSObject*, JSGlobalObject*, PropertyName, PropertySlot&); >- static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ static void getOwnSpecialPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > static bool put(JSCell*, JSGlobalObject*, PropertyName, JSValue, PutPropertySlot&); > static bool deleteProperty(JSCell*, JSGlobalObject*, PropertyName, DeletePropertySlot&); > static bool defineOwnProperty(JSObject*, JSGlobalObject*, PropertyName, const PropertyDescriptor&, bool shouldThrow); >Index: Source/JavaScriptCore/runtime/EnumerationMode.h >=================================================================== >--- Source/JavaScriptCore/runtime/EnumerationMode.h (revision 271116) >+++ Source/JavaScriptCore/runtime/EnumerationMode.h (working copy) >@@ -27,56 +27,20 @@ > > namespace JSC { > >-enum class PropertyNameMode { >+enum class PropertyNameMode : uint8_t { > Symbols = 1 << 0, > Strings = 1 << 1, > StringsAndSymbols = Symbols | Strings, > }; > >-enum class PrivateSymbolMode { >+enum class PrivateSymbolMode : uint8_t { > Include, > Exclude > }; > >-enum class DontEnumPropertiesMode { >+enum class DontEnumPropertiesMode : uint8_t { > Include, > Exclude > }; > >-enum class JSObjectPropertiesMode { >- Include, >- Exclude >-}; >- >-class EnumerationMode { >-public: >- EnumerationMode(DontEnumPropertiesMode dontEnumPropertiesMode = DontEnumPropertiesMode::Exclude, JSObjectPropertiesMode jsObjectPropertiesMode = JSObjectPropertiesMode::Include) >- : m_dontEnumPropertiesMode(dontEnumPropertiesMode) >- , m_jsObjectPropertiesMode(jsObjectPropertiesMode) >- { >- } >- >- EnumerationMode(const EnumerationMode& mode, JSObjectPropertiesMode jsObjectPropertiesMode) >- : m_dontEnumPropertiesMode(mode.m_dontEnumPropertiesMode) >- , m_jsObjectPropertiesMode(jsObjectPropertiesMode) >- { >- } >- >- // Add other constructors as needed for convenience >- >- bool includeDontEnumProperties() >- { >- return m_dontEnumPropertiesMode == DontEnumPropertiesMode::Include; >- } >- >- bool includeJSObjectProperties() >- { >- return m_jsObjectPropertiesMode == JSObjectPropertiesMode::Include; >- } >- >-private: >- DontEnumPropertiesMode m_dontEnumPropertiesMode; >- JSObjectPropertiesMode m_jsObjectPropertiesMode; >-}; >- > } // namespace JSC >Index: Source/JavaScriptCore/runtime/ErrorInstance.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/ErrorInstance.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/ErrorInstance.cpp (working copy) >@@ -260,20 +260,12 @@ bool ErrorInstance::getOwnPropertySlot(J > return Base::getOwnPropertySlot(thisObject, globalObject, propertyName, slot); > } > >-void ErrorInstance::getOwnNonIndexPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNameArray, EnumerationMode enumerationMode) >+void ErrorInstance::getOwnSpecialPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray&, DontEnumPropertiesMode mode) > { > VM& vm = globalObject->vm(); > ErrorInstance* thisObject = jsCast<ErrorInstance*>(object); >- thisObject->materializeErrorInfoIfNeeded(vm); >- Base::getOwnNonIndexPropertyNames(thisObject, globalObject, propertyNameArray, enumerationMode); >-} >- >-void ErrorInstance::getStructurePropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNameArray, EnumerationMode enumerationMode) >-{ >- VM& vm = globalObject->vm(); >- ErrorInstance* thisObject = jsCast<ErrorInstance*>(object); >- thisObject->materializeErrorInfoIfNeeded(vm); >- Base::getStructurePropertyNames(thisObject, globalObject, propertyNameArray, enumerationMode); >+ if (mode == DontEnumPropertiesMode::Include) >+ thisObject->materializeErrorInfoIfNeeded(vm); > } > > bool ErrorInstance::defineOwnProperty(JSObject* object, JSGlobalObject* globalObject, PropertyName propertyName, const PropertyDescriptor& descriptor, bool shouldThrow) >Index: Source/JavaScriptCore/runtime/ErrorInstance.h >=================================================================== >--- Source/JavaScriptCore/runtime/ErrorInstance.h (revision 271116) >+++ Source/JavaScriptCore/runtime/ErrorInstance.h (working copy) >@@ -29,7 +29,7 @@ namespace JSC { > class ErrorInstance : public JSNonFinalObject { > public: > using Base = JSNonFinalObject; >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnSpecialPropertyNames; > static constexpr bool needsDestruction = true; > > static void destroy(JSCell* cell) >@@ -93,8 +93,7 @@ protected: > void finishCreation(VM&, JSGlobalObject*, const String&, SourceAppender = nullptr, RuntimeType = TypeNothing, bool useCurrentFrame = true); > > static bool getOwnPropertySlot(JSObject*, JSGlobalObject*, PropertyName, PropertySlot&); >- static void getOwnNonIndexPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- static void getStructurePropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ static void getOwnSpecialPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > static bool defineOwnProperty(JSObject*, JSGlobalObject*, PropertyName, const PropertyDescriptor&, bool shouldThrow); > static bool put(JSCell*, JSGlobalObject*, PropertyName, JSValue, PutPropertySlot&); > static bool deleteProperty(JSCell*, JSGlobalObject*, PropertyName, DeletePropertySlot&); >Index: Source/JavaScriptCore/runtime/GenericArguments.h >=================================================================== >--- Source/JavaScriptCore/runtime/GenericArguments.h (revision 271116) >+++ Source/JavaScriptCore/runtime/GenericArguments.h (working copy) >@@ -36,7 +36,7 @@ template<typename Type> > class GenericArguments : public JSNonFinalObject { > public: > typedef JSNonFinalObject Base; >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesAnyFormOfGetPropertyNames; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnPropertyNames | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero; > > protected: > GenericArguments(VM& vm, Structure* structure) >@@ -47,7 +47,7 @@ protected: > static void visitChildren(JSCell*, SlotVisitor&); > static bool getOwnPropertySlot(JSObject*, JSGlobalObject*, PropertyName, PropertySlot&); > static bool getOwnPropertySlotByIndex(JSObject*, JSGlobalObject*, unsigned propertyName, PropertySlot&); >- static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > static bool put(JSCell*, JSGlobalObject*, PropertyName, JSValue, PutPropertySlot&); > static bool putByIndex(JSCell*, JSGlobalObject*, unsigned propertyName, JSValue, bool shouldThrow); > static bool deleteProperty(JSCell*, JSGlobalObject*, PropertyName, DeletePropertySlot&); >Index: Source/JavaScriptCore/runtime/GenericArgumentsInlines.h >=================================================================== >--- Source/JavaScriptCore/runtime/GenericArgumentsInlines.h (revision 271116) >+++ Source/JavaScriptCore/runtime/GenericArgumentsInlines.h (working copy) >@@ -90,7 +90,7 @@ bool GenericArguments<Type>::getOwnPrope > } > > template<typename Type> >-void GenericArguments<Type>::getOwnPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& array, EnumerationMode mode) >+void GenericArguments<Type>::getOwnPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& array, DontEnumPropertiesMode mode) > { > VM& vm = globalObject->vm(); > Type* thisObject = jsCast<Type*>(object); >@@ -101,15 +101,15 @@ void GenericArguments<Type>::getOwnPrope > continue; > array.add(Identifier::from(vm, i)); > } >+ thisObject->getOwnIndexedPropertyNames(globalObject, array, mode); > } > >- if (mode.includeDontEnumProperties() && !thisObject->overrodeThings()) { >+ if (mode == DontEnumPropertiesMode::Include && !thisObject->overrodeThings()) { > array.add(vm.propertyNames->length); > array.add(vm.propertyNames->callee); >- if (array.includeSymbolProperties()) >- array.add(vm.propertyNames->iteratorSymbol); >+ array.add(vm.propertyNames->iteratorSymbol); > } >- Base::getOwnPropertyNames(thisObject, globalObject, array, mode); >+ thisObject->getOwnNonIndexPropertyNames(globalObject, array, mode); > } > > template<typename Type> >Index: Source/JavaScriptCore/runtime/JSArray.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSArray.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/JSArray.cpp (working copy) >@@ -283,15 +283,11 @@ static int compareKeysForQSort(const voi > return (da > db) - (da < db); > } > >-void JSArray::getOwnNonIndexPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSArray::getOwnSpecialPropertyNames(JSObject*, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = globalObject->vm(); >- JSArray* thisObject = jsCast<JSArray*>(object); >- >- if (mode.includeDontEnumProperties()) >+ if (mode == DontEnumPropertiesMode::Include) > propertyNames.add(vm.propertyNames->length); >- >- JSObject::getOwnNonIndexPropertyNames(thisObject, globalObject, propertyNames, mode); > } > > // This method makes room in the vector, but leaves the new space for count slots uncleared. >Index: Source/JavaScriptCore/runtime/JSArray.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSArray.h (revision 271116) >+++ Source/JavaScriptCore/runtime/JSArray.h (working copy) >@@ -40,7 +40,7 @@ class JSArray : public JSNonFinalObject > > public: > typedef JSNonFinalObject Base; >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnSpecialPropertyNames; > > static size_t allocationSize(Checked<size_t> inlineCapacity) > { >@@ -189,7 +189,7 @@ protected: > static bool put(JSCell*, JSGlobalObject*, PropertyName, JSValue, PutPropertySlot&); > > static bool deleteProperty(JSCell*, JSGlobalObject*, PropertyName, DeletePropertySlot&); >- JS_EXPORT_PRIVATE static void getOwnNonIndexPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ JS_EXPORT_PRIVATE static void getOwnSpecialPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > > private: > bool isLengthWritable() >Index: Source/JavaScriptCore/runtime/JSCell.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSCell.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/JSCell.cpp (working copy) >@@ -206,12 +206,12 @@ void JSCell::doPutPropertySecurityCheck( > RELEASE_ASSERT_NOT_REACHED(); > } > >-void JSCell::getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode) >+void JSCell::getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode) > { > RELEASE_ASSERT_NOT_REACHED(); > } > >-void JSCell::getOwnNonIndexPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode) >+void JSCell::getOwnSpecialPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode) > { > RELEASE_ASSERT_NOT_REACHED(); > } >@@ -233,11 +233,6 @@ const char* JSCell::className(VM& vm) co > return classInfo(vm)->className; > } > >-void JSCell::getPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode) >-{ >- RELEASE_ASSERT_NOT_REACHED(); >-} >- > bool JSCell::customHasInstance(JSObject*, JSGlobalObject*, JSValue) > { > RELEASE_ASSERT_NOT_REACHED(); >@@ -256,16 +251,6 @@ uint32_t JSCell::getEnumerableLength(JSG > return 0; > } > >-void JSCell::getStructurePropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode) >-{ >- RELEASE_ASSERT_NOT_REACHED(); >-} >- >-void JSCell::getGenericPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode) >-{ >- RELEASE_ASSERT_NOT_REACHED(); >-} >- > bool JSCell::preventExtensions(JSObject*, JSGlobalObject*) > { > RELEASE_ASSERT_NOT_REACHED(); >Index: Source/JavaScriptCore/runtime/JSCell.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSCell.h (revision 271116) >+++ Source/JavaScriptCore/runtime/JSCell.h (working copy) >@@ -244,13 +244,10 @@ protected: > > // Dummy implementations of override-able static functions for classes to put in their MethodTable > static JSValue defaultValue(const JSObject*, JSGlobalObject*, PreferredPrimitiveType); >- static NO_RETURN_DUE_TO_CRASH void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- static NO_RETURN_DUE_TO_CRASH void getOwnNonIndexPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- static NO_RETURN_DUE_TO_CRASH void getPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ static NO_RETURN_DUE_TO_CRASH void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); >+ static NO_RETURN_DUE_TO_CRASH void getOwnSpecialPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > > static uint32_t getEnumerableLength(JSGlobalObject*, JSObject*); >- static NO_RETURN_DUE_TO_CRASH void getStructurePropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- static NO_RETURN_DUE_TO_CRASH void getGenericPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); > static NO_RETURN_DUE_TO_CRASH bool preventExtensions(JSObject*, JSGlobalObject*); > static NO_RETURN_DUE_TO_CRASH bool isExtensible(JSObject*, JSGlobalObject*); > static NO_RETURN_DUE_TO_CRASH bool setPrototype(JSObject*, JSGlobalObject*, JSValue, bool); >Index: Source/JavaScriptCore/runtime/JSFunction.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSFunction.cpp (revision 271117) >+++ Source/JavaScriptCore/runtime/JSFunction.cpp (working copy) >@@ -494,13 +494,13 @@ bool JSFunction::getOwnPropertySlot(JSOb > RELEASE_AND_RETURN(scope, Base::getOwnPropertySlot(thisObject, globalObject, propertyName, slot)); > } > >-void JSFunction::getOwnNonIndexPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSFunction::getOwnSpecialPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > JSFunction* thisObject = jsCast<JSFunction*>(object); > VM& vm = globalObject->vm(); > auto scope = DECLARE_THROW_SCOPE(vm); > >- if (mode.includeDontEnumProperties()) { >+ if (mode == DontEnumPropertiesMode::Include) { > if (!thisObject->isHostOrBuiltinFunction()) { > // Make sure prototype has been reified. > PropertySlot slot(thisObject, PropertySlot::InternalMethodType::VMInquiry, &vm); >@@ -524,7 +524,6 @@ void JSFunction::getOwnNonIndexPropertyN > } > } > } >- RELEASE_AND_RETURN(scope, Base::getOwnNonIndexPropertyNames(thisObject, globalObject, propertyNames, mode)); > } > > bool JSFunction::put(JSCell* cell, JSGlobalObject* globalObject, PropertyName propertyName, JSValue value, PutPropertySlot& slot) >Index: Source/JavaScriptCore/runtime/JSFunction.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSFunction.h (revision 271116) >+++ Source/JavaScriptCore/runtime/JSFunction.h (working copy) >@@ -70,7 +70,7 @@ public: > } > > typedef JSCallee Base; >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames | OverridesGetCallData; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnSpecialPropertyNames | OverridesGetCallData; > > static size_t allocationSize(Checked<size_t> inlineCapacity) > { >@@ -173,7 +173,7 @@ protected: > void finishCreation(VM&); > > static bool getOwnPropertySlot(JSObject*, JSGlobalObject*, PropertyName, PropertySlot&); >- static void getOwnNonIndexPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode = EnumerationMode()); >+ static void getOwnSpecialPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > static bool defineOwnProperty(JSObject*, JSGlobalObject*, PropertyName, const PropertyDescriptor&, bool shouldThrow); > > static bool put(JSCell*, JSGlobalObject*, PropertyName, JSValue, PutPropertySlot&); >Index: Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h (revision 271116) >+++ Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h (working copy) >@@ -96,7 +96,7 @@ public: > using Base = JSArrayBufferView; > typedef typename Adaptor::Type ElementType; > >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesAnyFormOfGetPropertyNames | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnPropertyNames | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero; > > static constexpr unsigned elementSize = sizeof(typename Adaptor::Type); > >@@ -304,7 +304,7 @@ private: > static bool putByIndex(JSCell*, JSGlobalObject*, unsigned propertyName, JSValue, bool shouldThrow); > static bool deletePropertyByIndex(JSCell*, JSGlobalObject*, unsigned propertyName); > >- static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > > static size_t estimatedSize(JSCell*, VM&); > static void visitChildren(JSCell*, SlotVisitor&); >Index: Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h (revision 271116) >+++ Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h (working copy) >@@ -464,7 +464,7 @@ bool JSGenericTypedArrayView<Adaptor>::d > > template<typename Adaptor> > void JSGenericTypedArrayView<Adaptor>::getOwnPropertyNames( >- JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& array, EnumerationMode mode) >+ JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& array, DontEnumPropertiesMode mode) > { > VM& vm = globalObject->vm(); > JSGenericTypedArrayView* thisObject = jsCast<JSGenericTypedArrayView*>(object); >@@ -474,7 +474,7 @@ void JSGenericTypedArrayView<Adaptor>::g > array.add(Identifier::from(vm, i)); > } > >- return Base::getOwnPropertyNames(object, globalObject, array, mode); >+ thisObject->getOwnNonIndexPropertyNames(globalObject, array, mode); > } > > template<typename Adaptor> >Index: Source/JavaScriptCore/runtime/JSGlobalObject.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSGlobalObject.h (revision 271116) >+++ Source/JavaScriptCore/runtime/JSGlobalObject.h (working copy) >@@ -571,9 +571,7 @@ public: > > public: > using Base = JSSegmentedVariableObject; >- // Do we realy need OverridesAnyFormOfGetPropertyNames here? >- // FIXME: https://bugs.webkit.org/show_bug.cgi?id=212954 >- static constexpr unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames | IsImmutablePrototypeExoticObject; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable | OverridesGetOwnPropertySlot | IsImmutablePrototypeExoticObject; > > static constexpr bool needsDestruction = true; > template<typename CellType, SubspaceAccess mode> >Index: Source/JavaScriptCore/runtime/JSLexicalEnvironment.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSLexicalEnvironment.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/JSLexicalEnvironment.cpp (working copy) >@@ -64,7 +64,7 @@ void JSLexicalEnvironment::analyzeHeap(J > } > } > >-void JSLexicalEnvironment::getOwnNonIndexPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSLexicalEnvironment::getOwnSpecialPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > JSLexicalEnvironment* thisObject = jsCast<JSLexicalEnvironment*>(object); > >@@ -73,7 +73,7 @@ void JSLexicalEnvironment::getOwnNonInde > SymbolTable::Map::iterator end = thisObject->symbolTable()->end(locker); > VM& vm = globalObject->vm(); > for (SymbolTable::Map::iterator it = thisObject->symbolTable()->begin(locker); it != end; ++it) { >- if (it->value.getAttributes() & PropertyAttribute::DontEnum && !mode.includeDontEnumProperties()) >+ if (mode == DontEnumPropertiesMode::Exclude && it->value.isDontEnum()) > continue; > if (!thisObject->isValidScopeOffset(it->value.scopeOffset())) > continue; >@@ -82,8 +82,6 @@ void JSLexicalEnvironment::getOwnNonInde > propertyNames.add(Identifier::fromUid(vm, it->key.get())); > } > } >- // Skip the JSSymbolTableObject's implementation of getOwnNonIndexPropertyNames >- JSObject::getOwnNonIndexPropertyNames(thisObject, globalObject, propertyNames, mode); > } > > bool JSLexicalEnvironment::getOwnPropertySlot(JSObject* object, JSGlobalObject* globalObject, PropertyName propertyName, PropertySlot& slot) >Index: Source/JavaScriptCore/runtime/JSLexicalEnvironment.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSLexicalEnvironment.h (revision 271116) >+++ Source/JavaScriptCore/runtime/JSLexicalEnvironment.h (working copy) >@@ -48,7 +48,7 @@ public: > } > > using Base = JSSymbolTableObject; >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnSpecialPropertyNames; > > WriteBarrierBase<Unknown>* variables() > { >@@ -106,7 +106,7 @@ public: > } > > static bool getOwnPropertySlot(JSObject*, JSGlobalObject*, PropertyName, PropertySlot&); >- static void getOwnNonIndexPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ static void getOwnSpecialPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > > static bool put(JSCell*, JSGlobalObject*, PropertyName, JSValue, PutPropertySlot&); > >Index: Source/JavaScriptCore/runtime/JSModuleEnvironment.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSModuleEnvironment.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/JSModuleEnvironment.cpp (working copy) >@@ -96,7 +96,7 @@ bool JSModuleEnvironment::getOwnProperty > return Base::getOwnPropertySlot(thisObject, globalObject, propertyName, slot); > } > >-void JSModuleEnvironment::getOwnNonIndexPropertyNames(JSObject* cell, JSGlobalObject* globalObject, PropertyNameArray& propertyNamesArray, EnumerationMode mode) >+void JSModuleEnvironment::getOwnSpecialPropertyNames(JSObject* cell, JSGlobalObject*, PropertyNameArray& propertyNamesArray, DontEnumPropertiesMode) > { > JSModuleEnvironment* thisObject = jsCast<JSModuleEnvironment*>(cell); > if (propertyNamesArray.includeStringProperties()) { >@@ -106,7 +106,6 @@ void JSModuleEnvironment::getOwnNonIndex > propertyNamesArray.add(importEntry.localName); > } > } >- return Base::getOwnNonIndexPropertyNames(thisObject, globalObject, propertyNamesArray, mode); > } > > bool JSModuleEnvironment::put(JSCell* cell, JSGlobalObject* globalObject, PropertyName propertyName, JSValue value, PutPropertySlot& slot) >Index: Source/JavaScriptCore/runtime/JSModuleEnvironment.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSModuleEnvironment.h (revision 271116) >+++ Source/JavaScriptCore/runtime/JSModuleEnvironment.h (working copy) >@@ -40,7 +40,7 @@ class JSModuleEnvironment final : public > friend class LLIntOffsetsExtractor; > public: > using Base = JSLexicalEnvironment; >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnSpecialPropertyNames; > > static JSModuleEnvironment* create(VM& vm, JSGlobalObject* globalObject, JSScope* currentScope, SymbolTable* symbolTable, JSValue initialValue, AbstractModuleRecord* moduleRecord) > { >@@ -73,7 +73,7 @@ public: > } > > static bool getOwnPropertySlot(JSObject*, JSGlobalObject*, PropertyName, PropertySlot&); >- static void getOwnNonIndexPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ static void getOwnSpecialPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > static bool put(JSCell*, JSGlobalObject*, PropertyName, JSValue, PutPropertySlot&); > static bool deleteProperty(JSCell*, JSGlobalObject*, PropertyName, DeletePropertySlot&); > >Index: Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp (working copy) >@@ -217,7 +217,7 @@ bool JSModuleNamespaceObject::deleteProp > return !thisObject->m_exports.contains(propertyName.uid()); > } > >-void JSModuleNamespaceObject::getOwnPropertyNames(JSObject* cell, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSModuleNamespaceObject::getOwnPropertyNames(JSObject* cell, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = globalObject->vm(); > auto scope = DECLARE_THROW_SCOPE(vm); >@@ -225,7 +225,7 @@ void JSModuleNamespaceObject::getOwnProp > // https://tc39.es/ecma262/#sec-module-namespace-exotic-objects-ownpropertykeys > JSModuleNamespaceObject* thisObject = jsCast<JSModuleNamespaceObject*>(cell); > for (const auto& name : thisObject->m_names) { >- if (!mode.includeDontEnumProperties()) { >+ if (mode == DontEnumPropertiesMode::Exclude) { > // Perform [[GetOwnProperty]] to throw ReferenceError if binding is uninitialized. > PropertySlot slot(cell, PropertySlot::InternalMethodType::GetOwnProperty); > thisObject->getOwnPropertySlotCommon(globalObject, name.impl(), slot); >@@ -233,7 +233,8 @@ void JSModuleNamespaceObject::getOwnProp > } > propertyNames.add(name.impl()); > } >- Base::getOwnPropertyNames(thisObject, globalObject, propertyNames, mode); >+ if (propertyNames.includeSymbolProperties()) >+ thisObject->getOwnNonIndexPropertyNames(globalObject, propertyNames, mode); > } > > bool JSModuleNamespaceObject::defineOwnProperty(JSObject* cell, JSGlobalObject* globalObject, PropertyName propertyName, const PropertyDescriptor& descriptor, bool shouldThrow) >Index: Source/JavaScriptCore/runtime/JSModuleNamespaceObject.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSModuleNamespaceObject.h (revision 271116) >+++ Source/JavaScriptCore/runtime/JSModuleNamespaceObject.h (working copy) >@@ -33,7 +33,7 @@ namespace JSC { > class JSModuleNamespaceObject final : public JSNonFinalObject { > public: > using Base = JSNonFinalObject; >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesAnyFormOfGetPropertyNames | GetOwnPropertySlotIsImpureForPropertyAbsence | IsImmutablePrototypeExoticObject; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnPropertyNames | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | GetOwnPropertySlotIsImpureForPropertyAbsence | IsImmutablePrototypeExoticObject; > > static constexpr bool needsDestruction = true; > static void destroy(JSCell*); >@@ -57,7 +57,7 @@ public: > JS_EXPORT_PRIVATE static bool put(JSCell*, JSGlobalObject*, PropertyName, JSValue, PutPropertySlot&); > JS_EXPORT_PRIVATE static bool putByIndex(JSCell*, JSGlobalObject*, unsigned propertyName, JSValue, bool shouldThrow); > JS_EXPORT_PRIVATE static bool deleteProperty(JSCell*, JSGlobalObject*, PropertyName, DeletePropertySlot&); >- JS_EXPORT_PRIVATE static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ JS_EXPORT_PRIVATE static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > JS_EXPORT_PRIVATE static bool defineOwnProperty(JSObject*, JSGlobalObject*, PropertyName, const PropertyDescriptor&, bool shouldThrow); > > DECLARE_EXPORT_INFO; >Index: Source/JavaScriptCore/runtime/JSONObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSONObject.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/JSONObject.cpp (working copy) >@@ -500,7 +500,7 @@ bool Stringifier::Holder::appendNextProp > m_propertyNames = stringifier.m_arrayReplacerPropertyNames.data(); > else { > PropertyNameArray objectPropertyNames(vm, PropertyNameMode::Strings, PrivateSymbolMode::Exclude); >- m_object->methodTable(vm)->getOwnPropertyNames(m_object, globalObject, objectPropertyNames, EnumerationMode()); >+ m_object->methodTable(vm)->getOwnPropertyNames(m_object, globalObject, objectPropertyNames, DontEnumPropertiesMode::Exclude); > RETURN_IF_EXCEPTION(scope, false); > m_propertyNames = objectPropertyNames.releaseData(); > } >@@ -719,7 +719,7 @@ NEVER_INLINE JSValue Walker::walk(JSValu > markedStack.appendWithCrashOnOverflow(object); > indexStack.append(0); > propertyStack.append(PropertyNameArray(vm, PropertyNameMode::Strings, PrivateSymbolMode::Exclude)); >- object->methodTable(vm)->getOwnPropertyNames(object, m_globalObject, propertyStack.last(), EnumerationMode()); >+ object->methodTable(vm)->getOwnPropertyNames(object, m_globalObject, propertyStack.last(), DontEnumPropertiesMode::Exclude); > RETURN_IF_EXCEPTION(scope, { }); > } > objectStartVisitMember: >Index: Source/JavaScriptCore/runtime/JSObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSObject.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/JSObject.cpp (working copy) >@@ -72,18 +72,19 @@ const ClassInfo JSObject::s_info = { "Ob > > const ClassInfo JSFinalObject::s_info = { "Object", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSFinalObject) }; > >-static inline void getClassPropertyNames(JSGlobalObject* globalObject, const ClassInfo* classInfo, PropertyNameArray& propertyNames, EnumerationMode mode) >+ALWAYS_INLINE void JSObject::getNonReifiedStaticPropertyNames(VM& vm, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { >- VM& vm = globalObject->vm(); >+ if (staticPropertiesReified(vm)) >+ return; > > // Add properties from the static hashtables of properties >- for (; classInfo; classInfo = classInfo->parentClass) { >- const HashTable* table = classInfo->staticPropHashTable; >+ for (const ClassInfo* info = classInfo(vm); info; info = info->parentClass) { >+ const HashTable* table = info->staticPropHashTable; > if (!table) > continue; > > for (auto iter = table->begin(); iter != table->end(); ++iter) { >- if (!(iter->attributes() & PropertyAttribute::DontEnum) || mode.includeDontEnumProperties()) >+ if (mode == DontEnumPropertiesMode::Include || !(iter->attributes() & PropertyAttribute::DontEnum)) > propertyNames.add(Identifier::fromString(vm, iter.key())); > } > } >@@ -2380,54 +2381,49 @@ JSC_DEFINE_HOST_FUNCTION(objectPrivateFu > return JSValue::encode(jsBoolean(JSObject::defaultHasInstance(globalObject, value, proto))); > } > >-// FIXME: Assert that properties returned by getOwnPropertyNames() are reported enumerable by getOwnPropertySlot(). >-// https://bugs.webkit.org/show_bug.cgi?id=219926 >-void JSObject::getPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSObject::getPropertyNames(JSGlobalObject* globalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = globalObject->vm(); > auto scope = DECLARE_THROW_SCOPE(vm); > >- if (UNLIKELY(!vm.isSafeToRecurseSoft())) { >- throwStackOverflowError(globalObject, scope); >- return; >- } >+ JSObject* object = this; >+ unsigned prototypeCount = 0; > >- object->methodTable(vm)->getOwnPropertyNames(object, globalObject, propertyNames, mode); >- RETURN_IF_EXCEPTION(scope, void()); >+ while (true) { >+ object->methodTable(vm)->getOwnPropertyNames(object, globalObject, propertyNames, mode); >+ RETURN_IF_EXCEPTION(scope, void()); > >- JSValue nextProto = object->getPrototype(vm, globalObject); >- RETURN_IF_EXCEPTION(scope, void()); >- if (nextProto.isNull()) >- return; >+ JSValue prototype = object->getPrototype(vm, globalObject); >+ RETURN_IF_EXCEPTION(scope, void()); >+ if (prototype.isNull()) >+ break; > >- JSObject* prototype = asObject(nextProto); >- while(1) { >- if (prototype->structure(vm)->typeInfo().overridesGetPropertyNames()) { >- scope.release(); >- prototype->methodTable(vm)->getPropertyNames(prototype, globalObject, propertyNames, mode); >+ if (UNLIKELY(++prototypeCount > maximumPrototypeChainDepth)) { >+ throwStackOverflowError(globalObject, scope); > return; > } >- prototype->methodTable(vm)->getOwnPropertyNames(prototype, globalObject, propertyNames, mode); >- RETURN_IF_EXCEPTION(scope, void()); >- nextProto = prototype->getPrototype(vm, globalObject); >- RETURN_IF_EXCEPTION(scope, void()); >- if (nextProto.isNull()) >- break; >- prototype = asObject(nextProto); >+ >+ object = asObject(prototype); > } > } > >-void JSObject::getOwnPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSObject::getOwnPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { >- VM& vm = globalObject->vm(); >- if (!mode.includeJSObjectProperties()) { >- // We still have to get non-indexed properties from any subclasses of JSObject that have them. >- object->methodTable(vm)->getOwnNonIndexPropertyNames(object, globalObject, propertyNames, mode); >- return; >- } >+ object->getOwnIndexedPropertyNames(globalObject, propertyNames, mode); >+ object->getOwnNonIndexPropertyNames(globalObject, propertyNames, mode); >+} >+ >+void JSObject::getOwnSpecialPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode) >+{ >+ // Structure::validateFlags() breaks if this method isn't exported, which is impossible if it's inlined. >+} >+ >+void JSObject::getOwnIndexedPropertyNames(JSGlobalObject*, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) >+{ >+ JSObject* object = this; > > if (propertyNames.includeStringProperties()) { >- // Add numeric properties first. That appears to be the accepted convention. >+ // Add numeric properties first per step 2 of https://tc39.es/ecma262/#sec-ordinaryownpropertykeys > // FIXME: Filling PropertyNameArray with an identifier for every integer > // is incredibly inefficient for large arrays. We need a different approach, > // which almost certainly means a different structure for PropertyNameArray. >@@ -2475,7 +2471,7 @@ void JSObject::getOwnPropertyNames(JSObj > > SparseArrayValueMap::const_iterator end = map->end(); > for (SparseArrayValueMap::const_iterator it = map->begin(); it != end; ++it) { >- if (mode.includeDontEnumProperties() || !(it->value.attributes() & PropertyAttribute::DontEnum)) >+ if (mode == DontEnumPropertiesMode::Include || !(it->value.attributes() & PropertyAttribute::DontEnum)) > keys.uncheckedAppend(static_cast<unsigned>(it->key)); > } > >@@ -2490,20 +2486,19 @@ void JSObject::getOwnPropertyNames(JSObj > RELEASE_ASSERT_NOT_REACHED(); > } > } >- >- object->methodTable(vm)->getOwnNonIndexPropertyNames(object, globalObject, propertyNames, mode); > } > >-void JSObject::getOwnNonIndexPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSObject::getOwnNonIndexPropertyNames(JSGlobalObject* globalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = globalObject->vm(); >- if (!object->staticPropertiesReified(vm)) >- getClassPropertyNames(globalObject, object->classInfo(vm), propertyNames, mode); >+ auto scope = DECLARE_THROW_SCOPE(vm); > >- if (!mode.includeJSObjectProperties()) >- return; >- >- object->structure(vm)->getPropertyNamesFromStructure(vm, propertyNames, mode); >+ methodTable(vm)->getOwnSpecialPropertyNames(this, globalObject, propertyNames, mode); >+ RETURN_IF_EXCEPTION(scope, void()); >+ >+ getNonReifiedStaticPropertyNames(vm, propertyNames, mode); >+ structure(vm)->getPropertyNamesFromStructure(vm, propertyNames, mode); >+ scope.assertNoException(); > } > > double JSObject::toNumber(JSGlobalObject* globalObject) const >@@ -3837,41 +3832,6 @@ uint32_t JSObject::getEnumerableLength(J > } > } > >-void JSObject::getStructurePropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >-{ >- VM& vm = globalObject->vm(); >- object->structure(vm)->getPropertyNamesFromStructure(vm, propertyNames, mode); >-} >- >-void JSObject::getGenericPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >-{ >- VM& vm = globalObject->vm(); >- auto scope = DECLARE_THROW_SCOPE(vm); >- object->methodTable(vm)->getOwnPropertyNames(object, globalObject, propertyNames, EnumerationMode(mode, JSObjectPropertiesMode::Exclude)); >- RETURN_IF_EXCEPTION(scope, void()); >- >- JSValue nextProto = object->getPrototype(vm, globalObject); >- RETURN_IF_EXCEPTION(scope, void()); >- if (nextProto.isNull()) >- return; >- >- JSObject* prototype = asObject(nextProto); >- while (true) { >- if (prototype->structure(vm)->typeInfo().overridesGetPropertyNames()) { >- scope.release(); >- prototype->methodTable(vm)->getPropertyNames(prototype, globalObject, propertyNames, mode); >- return; >- } >- prototype->methodTable(vm)->getOwnPropertyNames(prototype, globalObject, propertyNames, mode); >- RETURN_IF_EXCEPTION(scope, void()); >- nextProto = prototype->getPrototype(vm, globalObject); >- RETURN_IF_EXCEPTION(scope, void()); >- if (nextProto.isNull()) >- break; >- prototype = asObject(nextProto); >- } >-} >- > // Implements GetMethod(O, P) in section 7.3.9 of the spec. > // http://www.ecma-international.org/ecma-262/6.0/index.html#sec-getmethod > JSValue JSObject::getMethod(JSGlobalObject* globalObject, CallData& callData, const Identifier& ident, const String& errorMessage) >Index: Source/JavaScriptCore/runtime/JSObject.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSObject.h (revision 271116) >+++ Source/JavaScriptCore/runtime/JSObject.h (working copy) >@@ -674,13 +674,15 @@ public: > JS_EXPORT_PRIVATE bool hasInstance(JSGlobalObject*, JSValue); > static bool defaultHasInstance(JSGlobalObject*, JSValue, JSValue prototypeProperty); > >- JS_EXPORT_PRIVATE static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- JS_EXPORT_PRIVATE static void getOwnNonIndexPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- JS_EXPORT_PRIVATE static void getPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ static constexpr unsigned maximumPrototypeChainDepth = 40000; >+ JS_EXPORT_PRIVATE void getPropertyNames(JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); >+ JS_EXPORT_PRIVATE static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); >+ JS_EXPORT_PRIVATE static void getOwnSpecialPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); >+ JS_EXPORT_PRIVATE void getOwnIndexedPropertyNames(JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); >+ JS_EXPORT_PRIVATE void getOwnNonIndexPropertyNames(JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); >+ void getNonReifiedStaticPropertyNames(VM&, PropertyNameArray&, DontEnumPropertiesMode); > > JS_EXPORT_PRIVATE static uint32_t getEnumerableLength(JSGlobalObject*, JSObject*); >- JS_EXPORT_PRIVATE static void getStructurePropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- JS_EXPORT_PRIVATE static void getGenericPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); > > JS_EXPORT_PRIVATE JSValue toPrimitive(JSGlobalObject*, PreferredPrimitiveType = NoPreference) const; > JS_EXPORT_PRIVATE double toNumber(JSGlobalObject*) const; >Index: Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.cpp (working copy) >@@ -87,4 +87,52 @@ void JSPropertyNameEnumerator::visitChil > } > } > >+// FIXME: Assert that properties returned by getOwnPropertyNames() are reported enumerable by getOwnPropertySlot(). >+// https://bugs.webkit.org/show_bug.cgi?id=219926 >+void getEnumerablePropertyNames(JSGlobalObject* globalObject, JSObject* base, PropertyNameArray& propertyNames, uint32_t& indexedLength, uint32_t& structurePropertyCount) >+{ >+ VM& vm = globalObject->vm(); >+ auto scope = DECLARE_THROW_SCOPE(vm); >+ >+ Structure* structure = base->structure(vm); >+ if (structure->canAccessPropertiesQuicklyForEnumeration() && indexedLength == base->getArrayLength()) { >+ // Inlined JSObject::getOwnNonIndexPropertyNames() >+ base->methodTable(vm)->getOwnSpecialPropertyNames(base, globalObject, propertyNames, DontEnumPropertiesMode::Exclude); >+ RETURN_IF_EXCEPTION(scope, void()); >+ >+ base->getNonReifiedStaticPropertyNames(vm, propertyNames, DontEnumPropertiesMode::Exclude); >+ unsigned nonStructurePropertyCount = propertyNames.size(); >+ structure->getPropertyNamesFromStructure(vm, propertyNames, DontEnumPropertiesMode::Exclude); >+ scope.assertNoException(); >+ >+ // |propertyNames| contains properties exclusively from the structure. >+ if (!nonStructurePropertyCount) >+ structurePropertyCount = propertyNames.size(); >+ } else { >+ base->methodTable(vm)->getOwnPropertyNames(base, globalObject, propertyNames, DontEnumPropertiesMode::Exclude); >+ RETURN_IF_EXCEPTION(scope, void()); >+ // |propertyNames| contains all indexed properties, so disable enumeration based on getEnumerableLength(). >+ indexedLength = 0; >+ } >+ >+ JSObject* object = base; >+ unsigned prototypeCount = 0; >+ >+ while (true) { >+ JSValue prototype = object->getPrototype(vm, globalObject); >+ RETURN_IF_EXCEPTION(scope, void()); >+ if (prototype.isNull()) >+ break; >+ >+ if (UNLIKELY(++prototypeCount > JSObject::maximumPrototypeChainDepth)) { >+ throwStackOverflowError(globalObject, scope); >+ return; >+ } >+ >+ object = asObject(prototype); >+ object->methodTable(vm)->getOwnPropertyNames(object, globalObject, propertyNames, DontEnumPropertiesMode::Exclude); >+ RETURN_IF_EXCEPTION(scope, void()); >+ } >+} >+ > } // namespace JSC >Index: Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.h (revision 271116) >+++ Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.h (working copy) >@@ -101,6 +101,8 @@ private: > uint32_t m_cachedInlineCapacity; > }; > >+void getEnumerablePropertyNames(JSGlobalObject*, JSObject*, PropertyNameArray&, uint32_t& indexedLength, uint32_t& structurePropertyCount); >+ > inline JSPropertyNameEnumerator* propertyNameEnumerator(JSGlobalObject* globalObject, JSObject* base) > { > VM& vm = getVM(globalObject); >@@ -117,22 +119,8 @@ inline JSPropertyNameEnumerator* propert > return enumerator; > > uint32_t numberStructureProperties = 0; >- > PropertyNameArray propertyNames(vm, PropertyNameMode::Strings, PrivateSymbolMode::Exclude); >- >- if (structure->canAccessPropertiesQuicklyForEnumeration() && indexedLength == base->getArrayLength()) { >- base->methodTable(vm)->getStructurePropertyNames(base, globalObject, propertyNames, EnumerationMode()); >- scope.assertNoException(); >- >- numberStructureProperties = propertyNames.size(); >- >- base->methodTable(vm)->getGenericPropertyNames(base, globalObject, propertyNames, EnumerationMode()); >- } else { >- // Generic property names vector contains all indexed property names. >- // So disable indexed property enumeration phase by setting |indexedLength| to 0. >- indexedLength = 0; >- base->methodTable(vm)->getPropertyNames(base, globalObject, propertyNames, EnumerationMode()); >- } >+ getEnumerablePropertyNames(globalObject, base, propertyNames, indexedLength, numberStructureProperties); > RETURN_IF_EXCEPTION(scope, nullptr); > > ASSERT(propertyNames.size() < UINT32_MAX); >Index: Source/JavaScriptCore/runtime/JSProxy.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSProxy.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/JSProxy.cpp (working copy) >@@ -115,32 +115,13 @@ bool JSProxy::deletePropertyByIndex(JSCe > return thisObject->target()->methodTable(globalObject->vm())->deletePropertyByIndex(thisObject->target(), globalObject, propertyName); > } > >-void JSProxy::getPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >-{ >- JSProxy* thisObject = jsCast<JSProxy*>(object); >- thisObject->target()->methodTable(globalObject->vm())->getPropertyNames(thisObject->target(), globalObject, propertyNames, mode); >-} >- > uint32_t JSProxy::getEnumerableLength(JSGlobalObject* globalObject, JSObject* object) > { > JSProxy* thisObject = jsCast<JSProxy*>(object); > return thisObject->target()->methodTable(globalObject->vm())->getEnumerableLength(globalObject, thisObject->target()); > } > >-void JSProxy::getStructurePropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode) >-{ >- // Skip the structure loop, since it is invalid for proxies. >-} >- >-void JSProxy::getGenericPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >-{ >- JSProxy* thisObject = jsCast<JSProxy*>(object); >- // Get *all* of the property names, not just the generic ones, since we skipped the structure >- // ones above. >- thisObject->target()->methodTable(globalObject->vm())->getPropertyNames(thisObject->target(), globalObject, propertyNames, mode); >-} >- >-void JSProxy::getOwnPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSProxy::getOwnPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > JSProxy* thisObject = jsCast<JSProxy*>(object); > thisObject->target()->methodTable(globalObject->vm())->getOwnPropertyNames(thisObject->target(), globalObject, propertyNames, mode); >Index: Source/JavaScriptCore/runtime/JSProxy.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSProxy.h (revision 271116) >+++ Source/JavaScriptCore/runtime/JSProxy.h (working copy) >@@ -32,7 +32,7 @@ namespace JSC { > class JSProxy : public JSNonFinalObject { > public: > using Base = JSNonFinalObject; >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetPropertyNames | OverridesAnyFormOfGetPropertyNames | OverridesGetPrototype | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnPropertyNames | OverridesGetPrototype | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero; > > template<typename CellType, SubspaceAccess> > static IsoSubspace* subspaceFor(VM& vm) >@@ -95,11 +95,8 @@ protected: > JS_EXPORT_PRIVATE static bool putByIndex(JSCell*, JSGlobalObject*, unsigned, JSValue, bool shouldThrow); > JS_EXPORT_PRIVATE static bool deleteProperty(JSCell*, JSGlobalObject*, PropertyName, DeletePropertySlot&); > JS_EXPORT_PRIVATE static bool deletePropertyByIndex(JSCell*, JSGlobalObject*, unsigned); >- JS_EXPORT_PRIVATE static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- JS_EXPORT_PRIVATE static void getPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ JS_EXPORT_PRIVATE static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > JS_EXPORT_PRIVATE static uint32_t getEnumerableLength(JSGlobalObject*, JSObject*); >- JS_EXPORT_PRIVATE static void getStructurePropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- JS_EXPORT_PRIVATE static void getGenericPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); > JS_EXPORT_PRIVATE static bool defineOwnProperty(JSObject*, JSGlobalObject*, PropertyName, const PropertyDescriptor&, bool shouldThrow); > JS_EXPORT_PRIVATE static bool setPrototype(JSObject*, JSGlobalObject*, JSValue, bool shouldThrowIfCantSet); > JS_EXPORT_PRIVATE static JSValue getPrototype(JSObject*, JSGlobalObject*); >Index: Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp (working copy) >@@ -53,7 +53,7 @@ bool JSSymbolTableObject::deleteProperty > return Base::deleteProperty(thisObject, globalObject, propertyName, slot); > } > >-void JSSymbolTableObject::getOwnNonIndexPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSSymbolTableObject::getOwnSpecialPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = globalObject->vm(); > JSSymbolTableObject* thisObject = jsCast<JSSymbolTableObject*>(object); >@@ -61,15 +61,13 @@ void JSSymbolTableObject::getOwnNonIndex > ConcurrentJSLocker locker(thisObject->symbolTable()->m_lock); > SymbolTable::Map::iterator end = thisObject->symbolTable()->end(locker); > for (SymbolTable::Map::iterator it = thisObject->symbolTable()->begin(locker); it != end; ++it) { >- if (!(it->value.getAttributes() & PropertyAttribute::DontEnum) || mode.includeDontEnumProperties()) { >+ if (mode == DontEnumPropertiesMode::Include || !it->value.isDontEnum()) { > if (it->key->isSymbol() && !propertyNames.includeSymbolProperties()) > continue; > propertyNames.add(Identifier::fromUid(vm, it->key.get())); > } > } > } >- >- Base::getOwnNonIndexPropertyNames(thisObject, globalObject, propertyNames, mode); > } > > } // namespace JSC >Index: Source/JavaScriptCore/runtime/JSSymbolTableObject.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSSymbolTableObject.h (revision 271116) >+++ Source/JavaScriptCore/runtime/JSSymbolTableObject.h (working copy) >@@ -39,12 +39,12 @@ namespace JSC { > class JSSymbolTableObject : public JSScope { > public: > using Base = JSScope; >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesAnyFormOfGetPropertyNames; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnSpecialPropertyNames; > > SymbolTable* symbolTable() const { return m_symbolTable.get(); } > > JS_EXPORT_PRIVATE static bool deleteProperty(JSCell*, JSGlobalObject*, PropertyName, DeletePropertySlot&); >- JS_EXPORT_PRIVATE static void getOwnNonIndexPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ JS_EXPORT_PRIVATE static void getOwnSpecialPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > > static ptrdiff_t offsetOfSymbolTable() { return OBJECT_OFFSETOF(JSSymbolTableObject, m_symbolTable); } > >Index: Source/JavaScriptCore/runtime/JSTypeInfo.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSTypeInfo.h (revision 271116) >+++ Source/JavaScriptCore/runtime/JSTypeInfo.h (working copy) >@@ -48,13 +48,8 @@ static constexpr unsigned TypeInfoPerCel > // Out of line flags. > > static constexpr unsigned ImplementsHasInstance = 1 << 8; >-static constexpr unsigned OverridesGetPropertyNames = 1 << 9; >-// OverridesAnyFormOfGetPropertyNames means that we cannot make assumptions about >-// the cacheability or enumerability of property names, and therefore, we'll need >-// to disable certain optimizations. This flag should be set if one or more of the >-// following Object methods are overridden: >-// getOwnPropertyNames, getOwnNonIndexPropertyNames, getPropertyNames >-static constexpr unsigned OverridesAnyFormOfGetPropertyNames = 1 << 10; >+static constexpr unsigned OverridesGetOwnPropertyNames = 1 << 9; >+static constexpr unsigned OverridesGetOwnSpecialPropertyNames = 1 << 10; > static constexpr unsigned ProhibitsPropertyCaching = 1 << 11; > static constexpr unsigned GetOwnPropertySlotIsImpure = 1 << 12; > static constexpr unsigned NewImpurePropertyFiresWatchpoints = 1 << 13; >@@ -103,8 +98,9 @@ public: > static bool perCellBit(InlineTypeFlags flags) { return flags & TypeInfoPerCellBit; } > bool overridesToThis() const { return isSetOnFlags1<OverridesToThis>(); } > bool structureIsImmortal() const { return isSetOnFlags2<StructureIsImmortal>(); } >- bool overridesGetPropertyNames() const { return isSetOnFlags2<OverridesGetPropertyNames>(); } >- bool overridesAnyFormOfGetPropertyNames() const { return isSetOnFlags2<OverridesAnyFormOfGetPropertyNames>(); } >+ bool overridesGetOwnPropertyNames() const { return isSetOnFlags2<OverridesGetOwnPropertyNames>(); } >+ bool overridesGetOwnSpecialPropertyNames() const { return isSetOnFlags2<OverridesGetOwnSpecialPropertyNames>(); } >+ bool overridesAnyFormOfGetOwnPropertyNames() const { return overridesGetOwnPropertyNames() || overridesGetOwnSpecialPropertyNames(); } > bool overridesGetPrototype() const { return isSetOnFlags2<OverridesGetPrototype>(); } > bool prohibitsPropertyCaching() const { return isSetOnFlags2<ProhibitsPropertyCaching>(); } > bool getOwnPropertySlotIsImpure() const { return isSetOnFlags2<GetOwnPropertySlotIsImpure>(); } >Index: Source/JavaScriptCore/runtime/ObjectConstructor.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/ObjectConstructor.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/ObjectConstructor.cpp (working copy) >@@ -186,7 +186,7 @@ JSValue objectConstructorGetOwnPropertyD > VM& vm = globalObject->vm(); > auto scope = DECLARE_THROW_SCOPE(vm); > PropertyNameArray properties(vm, PropertyNameMode::StringsAndSymbols, PrivateSymbolMode::Exclude); >- object->methodTable(vm)->getOwnPropertyNames(object, globalObject, properties, EnumerationMode(DontEnumPropertiesMode::Include)); >+ object->methodTable(vm)->getOwnPropertyNames(object, globalObject, properties, DontEnumPropertiesMode::Include); > RETURN_IF_EXCEPTION(scope, { }); > > JSObject* descriptors = constructEmptyObject(globalObject); >@@ -294,7 +294,7 @@ JSC_DEFINE_HOST_FUNCTION(objectConstruct > auto canPerformFastPropertyEnumerationForObjectAssign = [] (Structure* structure) { > if (structure->typeInfo().overridesGetOwnPropertySlot()) > return false; >- if (structure->typeInfo().overridesAnyFormOfGetPropertyNames()) >+ if (structure->typeInfo().overridesAnyFormOfGetOwnPropertyNames()) > return false; > // FIXME: Indexed properties can be handled. > // https://bugs.webkit.org/show_bug.cgi?id=185358 >@@ -357,7 +357,7 @@ JSC_DEFINE_HOST_FUNCTION(objectConstruct > targetCanPerformFastPut = false; > > PropertyNameArray properties(vm, PropertyNameMode::StringsAndSymbols, PrivateSymbolMode::Exclude); >- source->methodTable(vm)->getOwnPropertyNames(source, globalObject, properties, EnumerationMode(DontEnumPropertiesMode::Include)); >+ source->methodTable(vm)->getOwnPropertyNames(source, globalObject, properties, DontEnumPropertiesMode::Include); > RETURN_IF_EXCEPTION(scope, { }); > > unsigned numProperties = properties.size(); >@@ -403,7 +403,7 @@ JSC_DEFINE_HOST_FUNCTION(objectConstruct > RETURN_IF_EXCEPTION(scope, { }); > > PropertyNameArray properties(vm, PropertyNameMode::Strings, PrivateSymbolMode::Exclude); >- target->methodTable(vm)->getOwnPropertyNames(target, globalObject, properties, EnumerationMode(DontEnumPropertiesMode::Include)); >+ target->methodTable(vm)->getOwnPropertyNames(target, globalObject, properties, DontEnumPropertiesMode::Include); > RETURN_IF_EXCEPTION(scope, { }); > > unsigned index = 0; >@@ -557,7 +557,7 @@ static JSValue defineProperties(JSGlobal > auto scope = DECLARE_THROW_SCOPE(vm); > > PropertyNameArray propertyNames(vm, PropertyNameMode::StringsAndSymbols, PrivateSymbolMode::Exclude); >- asObject(properties)->methodTable(vm)->getOwnPropertyNames(asObject(properties), globalObject, propertyNames, EnumerationMode(DontEnumPropertiesMode::Exclude)); >+ asObject(properties)->methodTable(vm)->getOwnPropertyNames(asObject(properties), globalObject, propertyNames, DontEnumPropertiesMode::Exclude); > RETURN_IF_EXCEPTION(scope, { }); > size_t numProperties = propertyNames.size(); > Vector<PropertyDescriptor> descriptors; >@@ -648,7 +648,7 @@ bool setIntegrityLevel(JSGlobalObject* g > return false; > > PropertyNameArray properties(vm, PropertyNameMode::StringsAndSymbols, PrivateSymbolMode::Exclude); >- object->methodTable(vm)->getOwnPropertyNames(object, globalObject, properties, EnumerationMode(DontEnumPropertiesMode::Include)); >+ object->methodTable(vm)->getOwnPropertyNames(object, globalObject, properties, DontEnumPropertiesMode::Include); > RETURN_IF_EXCEPTION(scope, false); > > PropertyNameArray::const_iterator end = properties.end(); >@@ -695,7 +695,7 @@ bool testIntegrityLevel(JSGlobalObject* > > // 6. Let keys be ? O.[[OwnPropertyKeys]](). > PropertyNameArray keys(vm, PropertyNameMode::StringsAndSymbols, PrivateSymbolMode::Exclude); >- object->methodTable(vm)->getOwnPropertyNames(object, globalObject, keys, EnumerationMode(DontEnumPropertiesMode::Include)); >+ object->methodTable(vm)->getOwnPropertyNames(object, globalObject, keys, DontEnumPropertiesMode::Include); > RETURN_IF_EXCEPTION(scope, { }); > > // 7. For each element k of keys, do >@@ -877,7 +877,7 @@ JSArray* ownPropertyKeys(JSGlobalObject* > } > > PropertyNameArray properties(vm, propertyNameMode, PrivateSymbolMode::Exclude); >- object->methodTable(vm)->getOwnPropertyNames(object, globalObject, properties, EnumerationMode(dontEnumPropertiesMode)); >+ object->methodTable(vm)->getOwnPropertyNames(object, globalObject, properties, dontEnumPropertiesMode); > RETURN_IF_EXCEPTION(scope, nullptr); > > if (propertyNameMode != PropertyNameMode::StringsAndSymbols) { >Index: Source/JavaScriptCore/runtime/ProxyObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/ProxyObject.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/ProxyObject.cpp (working copy) >@@ -890,10 +890,9 @@ void ProxyObject::performGetOwnPropertyN > JSValue ownKeysMethod = handler->getMethod(globalObject, callData, makeIdentifier(vm, "ownKeys"), "'ownKeys' property of a Proxy's handler should be callable"_s); > RETURN_IF_EXCEPTION(scope, void()); > JSObject* target = this->target(); >- EnumerationMode enumerationMode(DontEnumPropertiesMode::Include); > if (ownKeysMethod.isUndefined()) { > scope.release(); >- target->methodTable(vm)->getOwnPropertyNames(target, globalObject, propertyNames, enumerationMode); >+ target->methodTable(vm)->getOwnPropertyNames(target, globalObject, propertyNames, DontEnumPropertiesMode::Include); > return; > } > >@@ -946,7 +945,7 @@ void ProxyObject::performGetOwnPropertyN > RETURN_IF_EXCEPTION(scope, void()); > > PropertyNameArray targetKeys(vm, PropertyNameMode::StringsAndSymbols, PrivateSymbolMode::Exclude); >- target->methodTable(vm)->getOwnPropertyNames(target, globalObject, targetKeys, enumerationMode); >+ target->methodTable(vm)->getOwnPropertyNames(target, globalObject, targetKeys, DontEnumPropertiesMode::Include); > RETURN_IF_EXCEPTION(scope, void()); > Vector<UniquedStringImpl*> targetConfigurableKeys; > Vector<UniquedStringImpl*> targetNonConfigurableKeys; >@@ -1013,37 +1012,15 @@ void ProxyObject::performGetOwnEnumerabl > } > } > >-void ProxyObject::getOwnPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNameArray, EnumerationMode enumerationMode) >+void ProxyObject::getOwnPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNameArray, DontEnumPropertiesMode mode) > { > ProxyObject* thisObject = jsCast<ProxyObject*>(object); >- if (enumerationMode.includeDontEnumProperties()) >+ if (mode == DontEnumPropertiesMode::Include) > thisObject->performGetOwnPropertyNames(globalObject, propertyNameArray); > else > thisObject->performGetOwnEnumerablePropertyNames(globalObject, propertyNameArray); > } > >-void ProxyObject::getPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNameArray, EnumerationMode enumerationMode) >-{ >- NO_TAIL_CALLS(); >- JSObject::getPropertyNames(object, globalObject, propertyNameArray, enumerationMode); >-} >- >-void ProxyObject::getOwnNonIndexPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode) >-{ >- RELEASE_ASSERT_NOT_REACHED(); >-} >- >-void ProxyObject::getStructurePropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode) >-{ >- // We should always go down the getOwnPropertyNames path. >- RELEASE_ASSERT_NOT_REACHED(); >-} >- >-void ProxyObject::getGenericPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode) >-{ >- RELEASE_ASSERT_NOT_REACHED(); >-} >- > bool ProxyObject::performSetPrototype(JSGlobalObject* globalObject, JSValue prototype, bool shouldThrowIfCantSet) > { > NO_TAIL_CALLS(); >Index: Source/JavaScriptCore/runtime/ProxyObject.h >=================================================================== >--- Source/JavaScriptCore/runtime/ProxyObject.h (revision 271116) >+++ Source/JavaScriptCore/runtime/ProxyObject.h (working copy) >@@ -34,7 +34,7 @@ class ProxyObject final : public JSNonFi > public: > typedef JSNonFinalObject Base; > >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetCallData | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesGetPropertyNames | OverridesAnyFormOfGetPropertyNames | OverridesGetPrototype | ProhibitsPropertyCaching; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnPropertyNames | OverridesGetPrototype | OverridesGetCallData | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | ProhibitsPropertyCaching; > > template<typename CellType, SubspaceAccess mode> > static IsoSubspace* subspaceFor(VM& vm) >@@ -57,7 +57,6 @@ public: > if (isCallable) > flags |= (ImplementsHasInstance | ImplementsDefaultHasInstance); > Structure* result = Structure::create(vm, globalObject, prototype, TypeInfo(ProxyObjectType, flags), info(), NonArray | MayHaveIndexedAccessors); >- result->setIsQuickPropertyAccessAllowedForEnumeration(false); > RELEASE_ASSERT(!result->canAccessPropertiesQuicklyForEnumeration()); > RELEASE_ASSERT(!result->canCachePropertyNameEnumerator(vm)); > return result; >@@ -89,11 +88,7 @@ private: > static bool preventExtensions(JSObject*, JSGlobalObject*); > static bool isExtensible(JSObject*, JSGlobalObject*); > static bool defineOwnProperty(JSObject*, JSGlobalObject*, PropertyName, const PropertyDescriptor&, bool shouldThrow); >- static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- static void getPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- static NO_RETURN_DUE_TO_CRASH void getOwnNonIndexPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- static NO_RETURN_DUE_TO_CRASH void getStructurePropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- static NO_RETURN_DUE_TO_CRASH void getGenericPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > static bool setPrototype(JSObject*, JSGlobalObject*, JSValue prototype, bool shouldThrowIfCantSet); > static JSValue getPrototype(JSObject*, JSGlobalObject*); > static void visitChildren(JSCell*, SlotVisitor&); >Index: Source/JavaScriptCore/runtime/RegExpObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/RegExpObject.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/RegExpObject.cpp (working copy) >@@ -75,28 +75,11 @@ bool RegExpObject::deleteProperty(JSCell > return Base::deleteProperty(cell, globalObject, propertyName, slot); > } > >-void RegExpObject::getOwnNonIndexPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void RegExpObject::getOwnSpecialPropertyNames(JSObject*, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = globalObject->vm(); >- if (mode.includeDontEnumProperties()) >+ if (mode == DontEnumPropertiesMode::Include) > propertyNames.add(vm.propertyNames->lastIndex); >- Base::getOwnNonIndexPropertyNames(object, globalObject, propertyNames, mode); >-} >- >-void RegExpObject::getPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >-{ >- VM& vm = globalObject->vm(); >- if (mode.includeDontEnumProperties()) >- propertyNames.add(vm.propertyNames->lastIndex); >- Base::getPropertyNames(object, globalObject, propertyNames, mode); >-} >- >-void RegExpObject::getGenericPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >-{ >- VM& vm = globalObject->vm(); >- if (mode.includeDontEnumProperties()) >- propertyNames.add(vm.propertyNames->lastIndex); >- Base::getGenericPropertyNames(object, globalObject, propertyNames, mode); > } > > bool RegExpObject::defineOwnProperty(JSObject* object, JSGlobalObject* globalObject, PropertyName propertyName, const PropertyDescriptor& descriptor, bool shouldThrow) >Index: Source/JavaScriptCore/runtime/RegExpObject.h >=================================================================== >--- Source/JavaScriptCore/runtime/RegExpObject.h (revision 271116) >+++ Source/JavaScriptCore/runtime/RegExpObject.h (working copy) >@@ -30,7 +30,7 @@ namespace JSC { > class RegExpObject final : public JSNonFinalObject { > public: > using Base = JSNonFinalObject; >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetPropertyNames | OverridesAnyFormOfGetPropertyNames; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnSpecialPropertyNames; > > template<typename CellType, SubspaceAccess mode> > static IsoSubspace* subspaceFor(VM& vm) >@@ -146,9 +146,7 @@ private: > } > > JS_EXPORT_PRIVATE static bool deleteProperty(JSCell*, JSGlobalObject*, PropertyName, DeletePropertySlot&); >- JS_EXPORT_PRIVATE static void getOwnNonIndexPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- JS_EXPORT_PRIVATE static void getPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- JS_EXPORT_PRIVATE static void getGenericPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ JS_EXPORT_PRIVATE static void getOwnSpecialPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > JS_EXPORT_PRIVATE static bool defineOwnProperty(JSObject*, JSGlobalObject*, PropertyName, const PropertyDescriptor&, bool shouldThrow); > > MatchResult matchInline(JSGlobalObject*, JSString*); >Index: Source/JavaScriptCore/runtime/StringObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/StringObject.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/StringObject.cpp (working copy) >@@ -145,7 +145,7 @@ bool StringObject::deletePropertyByIndex > return JSObject::deletePropertyByIndex(thisObject, globalObject, i); > } > >-void StringObject::getOwnPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void StringObject::getOwnPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = globalObject->vm(); > StringObject* thisObject = jsCast<StringObject*>(object); >@@ -153,17 +153,11 @@ void StringObject::getOwnPropertyNames(J > int size = thisObject->internalValue()->length(); > for (int i = 0; i < size; ++i) > propertyNames.add(Identifier::from(vm, i)); >+ thisObject->getOwnIndexedPropertyNames(globalObject, propertyNames, mode); > } >- return JSObject::getOwnPropertyNames(thisObject, globalObject, propertyNames, mode); >-} >- >-void StringObject::getOwnNonIndexPropertyNames(JSObject* object, JSGlobalObject* globalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >-{ >- VM& vm = globalObject->vm(); >- StringObject* thisObject = jsCast<StringObject*>(object); >- if (mode.includeDontEnumProperties()) >+ if (mode == DontEnumPropertiesMode::Include) > propertyNames.add(vm.propertyNames->length); >- return JSObject::getOwnNonIndexPropertyNames(thisObject, globalObject, propertyNames, mode); >+ thisObject->getOwnNonIndexPropertyNames(globalObject, propertyNames, mode); > } > > String StringObject::toStringName(const JSObject*, JSGlobalObject*) >Index: Source/JavaScriptCore/runtime/StringObject.h >=================================================================== >--- Source/JavaScriptCore/runtime/StringObject.h (revision 271116) >+++ Source/JavaScriptCore/runtime/StringObject.h (working copy) >@@ -28,7 +28,7 @@ namespace JSC { > class StringObject : public JSWrapperObject { > public: > using Base = JSWrapperObject; >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesAnyFormOfGetPropertyNames; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnPropertyNames | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero; > > template<typename, SubspaceAccess mode> > static IsoSubspace* subspaceFor(VM& vm) >@@ -59,8 +59,7 @@ public: > > JS_EXPORT_PRIVATE static bool deleteProperty(JSCell*, JSGlobalObject*, PropertyName, DeletePropertySlot&); > JS_EXPORT_PRIVATE static bool deletePropertyByIndex(JSCell*, JSGlobalObject*, unsigned propertyName); >- JS_EXPORT_PRIVATE static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >- JS_EXPORT_PRIVATE static void getOwnNonIndexPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ JS_EXPORT_PRIVATE static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > JS_EXPORT_PRIVATE static bool defineOwnProperty(JSObject*, JSGlobalObject*, PropertyName, const PropertyDescriptor&, bool shouldThrow); > static String toStringName(const JSObject*, JSGlobalObject*); > >Index: Source/JavaScriptCore/runtime/Structure.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/Structure.cpp (revision 271116) >+++ Source/JavaScriptCore/runtime/Structure.cpp (working copy) >@@ -194,32 +194,20 @@ void Structure::validateFlags() > && methodTable.doPutPropertySecurityCheck != JSCell::doPutPropertySecurityCheck; > RELEASE_ASSERT(overridesPutPropertySecurityCheck == typeInfo().hasPutPropertySecurityCheck()); > >- bool overridesGetPropertyNames = >- methodTable.getPropertyNames != JSObject::getPropertyNames >- && methodTable.getPropertyNames != JSCell::getPropertyNames; > bool overridesGetOwnPropertyNames = > methodTable.getOwnPropertyNames != JSObject::getOwnPropertyNames > && methodTable.getOwnPropertyNames != JSCell::getOwnPropertyNames; >- bool overridesGetOwnNonIndexPropertyNames = >- methodTable.getOwnNonIndexPropertyNames != JSObject::getOwnNonIndexPropertyNames >- && methodTable.getOwnNonIndexPropertyNames != JSCell::getOwnNonIndexPropertyNames; >- >- RELEASE_ASSERT(overridesGetPropertyNames == typeInfo().overridesGetPropertyNames()); >- >- // We can strengthen this into an equivalence test if there are no classes >- // that specifies this flag without overriding any of the forms of getPropertyNames. >- // FIXME: https://bugs.webkit.org/show_bug.cgi?id=212954 >- if (overridesGetPropertyNames >- || overridesGetOwnPropertyNames >- || overridesGetOwnNonIndexPropertyNames) >- RELEASE_ASSERT(typeInfo().overridesAnyFormOfGetPropertyNames()); >+ RELEASE_ASSERT(overridesGetOwnPropertyNames == typeInfo().overridesGetOwnPropertyNames()); >+ >+ bool overridesGetOwnSpecialPropertyNames = >+ methodTable.getOwnSpecialPropertyNames != JSObject::getOwnSpecialPropertyNames >+ && methodTable.getOwnSpecialPropertyNames != JSCell::getOwnSpecialPropertyNames; >+ RELEASE_ASSERT(overridesGetOwnSpecialPropertyNames == typeInfo().overridesGetOwnSpecialPropertyNames()); > > bool overridesGetPrototype = > methodTable.getPrototype != static_cast<MethodTable::GetPrototypeFunctionPtr>(JSObject::getPrototype) > && methodTable.getPrototype != JSCell::getPrototype; >- >- if (overridesGetPrototype) >- RELEASE_ASSERT(typeInfo().overridesGetPrototype()); >+ RELEASE_ASSERT(overridesGetPrototype == typeInfo().overridesGetPrototype()); > } > #else > inline void Structure::validateFlags() { } >@@ -1203,7 +1191,7 @@ PropertyOffset Structure::attributeChang > }); > } > >-void Structure::getPropertyNamesFromStructure(VM& vm, PropertyNameArray& propertyNames, EnumerationMode mode) >+void Structure::getPropertyNamesFromStructure(VM& vm, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > PropertyTable* table = ensurePropertyTableIfNotEmpty(vm); > if (!table) >@@ -1213,7 +1201,7 @@ void Structure::getPropertyNamesFromStru > bool foundSymbol = false; > > auto checkDontEnumAndAdd = [&](PropertyTable::iterator iter) { >- if (!(iter->attributes & PropertyAttribute::DontEnum) || mode.includeDontEnumProperties()) { >+ if (mode == DontEnumPropertiesMode::Include || !(iter->attributes & PropertyAttribute::DontEnum)) { > if (knownUnique) > propertyNames.addUnchecked(iter->key); > else >@@ -1492,6 +1480,8 @@ bool Structure::canAccessPropertiesQuick > return false; > if (isUncacheableDictionary()) > return false; >+ if (typeInfo().overridesGetOwnPropertyNames()) >+ return false; > return true; > } > >Index: Source/JavaScriptCore/runtime/Structure.h >=================================================================== >--- Source/JavaScriptCore/runtime/Structure.h (revision 271116) >+++ Source/JavaScriptCore/runtime/Structure.h (working copy) >@@ -530,7 +530,7 @@ public: > void setCachedPropertyNames(VM&, CachedPropertyNamesKind, JSImmutableButterfly*); > bool canCacheOwnPropertyNames() const; > >- void getPropertyNamesFromStructure(VM&, PropertyNameArray&, EnumerationMode); >+ void getPropertyNamesFromStructure(VM&, PropertyNameArray&, DontEnumPropertiesMode); > > JSValue cachedSpecialProperty(CachedSpecialPropertyKey key) > { >Index: Source/JavaScriptCore/runtime/StructureInlines.h >=================================================================== >--- Source/JavaScriptCore/runtime/StructureInlines.h (revision 271116) >+++ Source/JavaScriptCore/runtime/StructureInlines.h (working copy) >@@ -275,7 +275,7 @@ inline bool Structure::canCacheOwnProper > return false; > if (hasIndexedProperties(indexingType())) > return false; >- if (typeInfo().overridesAnyFormOfGetPropertyNames()) >+ if (typeInfo().overridesAnyFormOfGetOwnPropertyNames()) > return false; > return true; > } >Index: Source/JavaScriptCore/tools/JSDollarVM.cpp >=================================================================== >--- Source/JavaScriptCore/tools/JSDollarVM.cpp (revision 271116) >+++ Source/JavaScriptCore/tools/JSDollarVM.cpp (working copy) >@@ -543,7 +543,7 @@ static JSC_DECLARE_CUSTOM_GETTER(runtime > class RuntimeArray : public JSArray { > public: > typedef JSArray Base; >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesAnyFormOfGetPropertyNames; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero; > > IGNORE_WARNINGS_BEGIN("unused-const-variable") > static constexpr bool needsDestruction = false; >Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 271116) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,37 @@ >+2021-01-01 Alexey Shvayka <shvaikalesh@gmail.com> >+ >+ [JSC] Simplify get*PropertyNames() methods and EnumerationMode >+ https://bugs.webkit.org/show_bug.cgi?id=212954 >+ >+ Reviewed by Yusuke Suzuki. >+ >+ Adjust for changes in JSC's MethodTable, TypeInfo, and EnumerationMode. >+ >+ No new tests, no behavior change. >+ >+ * animation/KeyframeEffect.cpp: >+ (WebCore::processKeyframeLikeObject): >+ * bindings/js/JSDOMConvertRecord.h: >+ * bindings/js/JSDOMWindowCustom.cpp: >+ (WebCore::JSDOMWindow::getOwnPropertyNames): >+ * bindings/js/JSLocationCustom.cpp: >+ (WebCore::JSLocation::getOwnPropertyNames): >+ * bindings/js/JSRemoteDOMWindowCustom.cpp: >+ (WebCore::JSRemoteDOMWindow::getOwnPropertyNames): >+ * bindings/js/SerializedScriptValue.cpp: >+ (WebCore::CloneSerializer::serialize): >+ * bindings/scripts/CodeGeneratorJS.pm: >+ (GenerateGetOwnPropertyNames): >+ (GenerateHeader): >+ * bindings/scripts/test/JS/*: Updated. >+ * bridge/NP_jsobject.cpp: >+ * bridge/runtime_array.cpp: >+ (JSC::RuntimeArray::getOwnPropertyNames): >+ * bridge/runtime_array.h: >+ * bridge/runtime_object.cpp: >+ (JSC::Bindings::RuntimeObject::getOwnPropertyNames): >+ * bridge/runtime_object.h: >+ > 2020-12-31 Zalan Bujtas <zalan@apple.com> > > [LFC][IFC] Horizontal padding/border makes the inline box non-empty >Index: Source/WebCore/animation/KeyframeEffect.cpp >=================================================================== >--- Source/WebCore/animation/KeyframeEffect.cpp (revision 271116) >+++ Source/WebCore/animation/KeyframeEffect.cpp (working copy) >@@ -238,7 +238,7 @@ static inline ExceptionOr<KeyframeEffect > > // 3. Let input properties be the result of calling the EnumerableOwnNames operation with keyframe input as the object. > PropertyNameArray inputProperties(vm, PropertyNameMode::Strings, PrivateSymbolMode::Exclude); >- JSObject::getOwnPropertyNames(keyframesInput.get(), &lexicalGlobalObject, inputProperties, EnumerationMode()); >+ JSObject::getOwnPropertyNames(keyframesInput.get(), &lexicalGlobalObject, inputProperties, DontEnumPropertiesMode::Exclude); > > // 4. Make up a new list animation properties that consists of all of the properties that are in both input properties and animatable > // properties, or which are in input properties and conform to the <custom-property-name> production. >Index: Source/WebCore/bindings/js/JSDOMConvertRecord.h >=================================================================== >--- Source/WebCore/bindings/js/JSDOMConvertRecord.h (revision 271116) >+++ Source/WebCore/bindings/js/JSDOMConvertRecord.h (working copy) >@@ -100,7 +100,7 @@ private: > > // 4. Let keys be ? O.[[OwnPropertyKeys]](). > JSC::PropertyNameArray keys(vm, JSC::PropertyNameMode::Strings, JSC::PrivateSymbolMode::Exclude); >- object->methodTable(vm)->getOwnPropertyNames(object, &lexicalGlobalObject, keys, JSC::EnumerationMode(JSC::DontEnumPropertiesMode::Include)); >+ object->methodTable(vm)->getOwnPropertyNames(object, &lexicalGlobalObject, keys, JSC::DontEnumPropertiesMode::Include); > > RETURN_IF_EXCEPTION(scope, { }); > >@@ -113,7 +113,7 @@ private: > > // 2. If desc is not undefined and desc.[[Enumerable]] is true: > >- // It's necessary to filter enumerable here rather than using the default EnumerationMode, >+ // It's necessary to filter enumerable here rather than using DontEnumPropertiesMode::Exclude, > // to prevent an observable extra [[GetOwnProperty]] operation in the case of ProxyObject records. > if (didGetDescriptor && descriptor.enumerable()) { > // 1. Let typedKey be key converted to an IDL value of type K. >Index: Source/WebCore/bindings/js/JSDOMWindowCustom.cpp >=================================================================== >--- Source/WebCore/bindings/js/JSDOMWindowCustom.cpp (revision 271116) >+++ Source/WebCore/bindings/js/JSDOMWindowCustom.cpp (working copy) >@@ -454,14 +454,14 @@ static void addScopedChildrenIndexes(JSG > } > > // https://html.spec.whatwg.org/#windowproxy-ownpropertykeys >-void JSDOMWindow::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSDOMWindow::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > JSDOMWindow* thisObject = jsCast<JSDOMWindow*>(object); > > addScopedChildrenIndexes(*lexicalGlobalObject, thisObject->wrapped(), propertyNames); > > if (!BindingSecurity::shouldAllowAccessToDOMWindow(lexicalGlobalObject, thisObject->wrapped(), DoNotReportSecurityError)) { >- if (mode.includeDontEnumProperties()) >+ if (mode == DontEnumPropertiesMode::Include) > addCrossOriginOwnPropertyNames<CrossOriginObject::Window>(*lexicalGlobalObject, propertyNames); > return; > } >Index: Source/WebCore/bindings/js/JSLocationCustom.cpp >=================================================================== >--- Source/WebCore/bindings/js/JSLocationCustom.cpp (revision 271116) >+++ Source/WebCore/bindings/js/JSLocationCustom.cpp (working copy) >@@ -176,11 +176,11 @@ bool JSLocation::deletePropertyByIndex(J > return Base::deletePropertyByIndex(thisObject, lexicalGlobalObject, propertyName); > } > >-void JSLocation::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSLocation::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > JSLocation* thisObject = jsCast<JSLocation*>(object); > if (!BindingSecurity::shouldAllowAccessToDOMWindow(lexicalGlobalObject, thisObject->wrapped().window(), DoNotReportSecurityError)) { >- if (mode.includeDontEnumProperties()) >+ if (mode == DontEnumPropertiesMode::Include) > addCrossOriginOwnPropertyNames<CrossOriginObject::Location>(*lexicalGlobalObject, propertyNames); > return; > } >Index: Source/WebCore/bindings/js/JSRemoteDOMWindowCustom.cpp >=================================================================== >--- Source/WebCore/bindings/js/JSRemoteDOMWindowCustom.cpp (revision 271116) >+++ Source/WebCore/bindings/js/JSRemoteDOMWindowCustom.cpp (working copy) >@@ -100,11 +100,11 @@ bool JSRemoteDOMWindow::deletePropertyBy > return false; > } > >-void JSRemoteDOMWindow::getOwnPropertyNames(JSObject*, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSRemoteDOMWindow::getOwnPropertyNames(JSObject*, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > // FIXME: Add scoped children indexes. > >- if (mode.includeDontEnumProperties()) >+ if (mode == DontEnumPropertiesMode::Include) > addCrossOriginOwnPropertyNames<CrossOriginObject::Window>(*lexicalGlobalObject, propertyNames); > } > >Index: Source/WebCore/bindings/js/SerializedScriptValue.cpp >=================================================================== >--- Source/WebCore/bindings/js/SerializedScriptValue.cpp (revision 271116) >+++ Source/WebCore/bindings/js/SerializedScriptValue.cpp (working copy) >@@ -1728,7 +1728,7 @@ SerializationReturnCode CloneSerializer: > lengthStack.removeLast(); > > propertyStack.append(PropertyNameArray(vm, PropertyNameMode::Strings, PrivateSymbolMode::Exclude)); >- array->methodTable(vm)->getOwnNonIndexPropertyNames(array, m_lexicalGlobalObject, propertyStack.last(), EnumerationMode()); >+ array->getOwnNonIndexPropertyNames(m_lexicalGlobalObject, propertyStack.last(), DontEnumPropertiesMode::Exclude); > if (propertyStack.last().size()) { > write(NonIndexPropertiesTag); > indexStack.append(0); >@@ -1778,7 +1778,7 @@ SerializationReturnCode CloneSerializer: > inputObjectStack.append(inObject); > indexStack.append(0); > propertyStack.append(PropertyNameArray(vm, PropertyNameMode::Strings, PrivateSymbolMode::Exclude)); >- inObject->methodTable(vm)->getOwnPropertyNames(inObject, m_lexicalGlobalObject, propertyStack.last(), EnumerationMode()); >+ inObject->methodTable(vm)->getOwnPropertyNames(inObject, m_lexicalGlobalObject, propertyStack.last(), DontEnumPropertiesMode::Exclude); > } > objectStartVisitMember: > FALLTHROUGH; >@@ -1846,7 +1846,7 @@ SerializationReturnCode CloneSerializer: > JSObject* object = inputObjectStack.last(); > ASSERT(jsDynamicCast<JSMap*>(vm, object)); > propertyStack.append(PropertyNameArray(vm, PropertyNameMode::Strings, PrivateSymbolMode::Exclude)); >- object->methodTable(vm)->getOwnPropertyNames(object, m_lexicalGlobalObject, propertyStack.last(), EnumerationMode()); >+ object->methodTable(vm)->getOwnPropertyNames(object, m_lexicalGlobalObject, propertyStack.last(), DontEnumPropertiesMode::Exclude); > write(NonMapPropertiesTag); > indexStack.append(0); > goto objectStartVisitMember; >@@ -1890,7 +1890,7 @@ SerializationReturnCode CloneSerializer: > JSObject* object = inputObjectStack.last(); > ASSERT(jsDynamicCast<JSSet*>(vm, object)); > propertyStack.append(PropertyNameArray(vm, PropertyNameMode::Strings, PrivateSymbolMode::Exclude)); >- object->methodTable(vm)->getOwnPropertyNames(object, m_lexicalGlobalObject, propertyStack.last(), EnumerationMode()); >+ object->methodTable(vm)->getOwnPropertyNames(object, m_lexicalGlobalObject, propertyStack.last(), DontEnumPropertiesMode::Exclude); > write(NonSetPropertiesTag); > indexStack.append(0); > goto objectStartVisitMember; >Index: Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >=================================================================== >--- Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (revision 271116) >+++ Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (working copy) >@@ -1122,7 +1122,7 @@ sub GenerateGetOwnPropertyNames > my $namedGetterOperation = GetNamedGetterOperation($interface); > my $indexedGetterOperation = GetIndexedGetterOperation($interface); > >- push(@$outputArray, "void ${className}::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode)\n"); >+ push(@$outputArray, "void ${className}::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode)\n"); > push(@$outputArray, "{\n"); > if ($indexedGetterOperation || $namedGetterOperation) { > push(@$outputArray, " VM& vm = JSC::getVM(lexicalGlobalObject);\n"); >@@ -1148,7 +1148,7 @@ sub GenerateGetOwnPropertyNames > push(@$outputArray, " for (auto& propertyName : thisObject->wrapped().supportedPropertyNames())\n"); > push(@$outputArray, " propertyNames.add(Identifier::fromString(vm, propertyName));\n"); > } else { >- push(@$outputArray, " if (mode.includeDontEnumProperties()) {\n"); >+ push(@$outputArray, " if (mode == DontEnumPropertiesMode::Include) {\n"); > push(@$outputArray, " for (auto& propertyName : thisObject->wrapped().supportedPropertyNames())\n"); > push(@$outputArray, " propertyNames.add(Identifier::fromString(vm, propertyName));\n"); > push(@$outputArray, " }\n"); >@@ -2980,8 +2980,8 @@ sub GenerateHeader > } > > if (InstanceOverridesGetOwnPropertyNames($interface)) { >- push(@headerContent, " static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode());\n"); >- $structureFlags{"JSC::OverridesAnyFormOfGetPropertyNames"} = 1; >+ push(@headerContent, " static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode);\n"); >+ $structureFlags{"JSC::OverridesGetOwnPropertyNames"} = 1; > } > > if (InstanceOverridesPut($interface)) { >Index: Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp (working copy) >@@ -208,7 +208,7 @@ bool JSTestEventTarget::getOwnPropertySl > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestEventTarget::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestEventTarget::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestEventTarget*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h (working copy) >@@ -43,7 +43,7 @@ public: > static TestEventTarget* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > > DECLARE_INFO; > >@@ -66,7 +66,7 @@ public: > return static_cast<TestEventTarget&>(Base::wrapped()); > } > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::MasqueradesAsUndefined | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::MasqueradesAsUndefined | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot; > protected: > JSTestEventTarget(JSC::Structure*, JSDOMGlobalObject&, Ref<TestEventTarget>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp (working copy) >@@ -178,7 +178,7 @@ bool JSTestIndexedSetterNoIdentifier::ge > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestIndexedSetterNoIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestIndexedSetterNoIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestIndexedSetterNoIdentifier*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestIndexedSetterNoIdentifier* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool put(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); > static bool putByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned propertyName, JSC::JSValue, bool shouldThrow); > static bool defineOwnProperty(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow); >@@ -64,7 +64,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot; > protected: > JSTestIndexedSetterNoIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestIndexedSetterNoIdentifier>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp (working copy) >@@ -178,7 +178,7 @@ bool JSTestIndexedSetterThrowingExceptio > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestIndexedSetterThrowingException::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestIndexedSetterThrowingException::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestIndexedSetterThrowingException*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestIndexedSetterThrowingException* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool put(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); > static bool putByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned propertyName, JSC::JSValue, bool shouldThrow); > static bool defineOwnProperty(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow); >@@ -64,7 +64,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot; > protected: > JSTestIndexedSetterThrowingException(JSC::Structure*, JSDOMGlobalObject&, Ref<TestIndexedSetterThrowingException>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp (working copy) >@@ -185,7 +185,7 @@ bool JSTestIndexedSetterWithIdentifier:: > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestIndexedSetterWithIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestIndexedSetterWithIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestIndexedSetterWithIdentifier*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestIndexedSetterWithIdentifier* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool put(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); > static bool putByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned propertyName, JSC::JSValue, bool shouldThrow); > static bool defineOwnProperty(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow); >@@ -64,7 +64,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot; > protected: > JSTestIndexedSetterWithIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestIndexedSetterWithIdentifier>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestLegacyOverrideBuiltIns.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestLegacyOverrideBuiltIns.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestLegacyOverrideBuiltIns.cpp (working copy) >@@ -199,7 +199,7 @@ bool JSTestLegacyOverrideBuiltIns::getOw > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestLegacyOverrideBuiltIns::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestLegacyOverrideBuiltIns::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestLegacyOverrideBuiltIns*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestLegacyOverrideBuiltIns.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestLegacyOverrideBuiltIns.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestLegacyOverrideBuiltIns.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestLegacyOverrideBuiltIns* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static void destroy(JSC::JSCell*); > > DECLARE_INFO; >@@ -61,7 +61,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpure | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpure | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot; > protected: > JSTestLegacyOverrideBuiltIns(JSC::Structure*, JSDOMGlobalObject&, Ref<TestLegacyOverrideBuiltIns>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp (working copy) >@@ -207,7 +207,7 @@ bool JSTestNamedAndIndexedSetterNoIdenti > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedAndIndexedSetterNoIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedAndIndexedSetterNoIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedAndIndexedSetterNoIdentifier*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedAndIndexedSetterNoIdentifier* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool put(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); > static bool putByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned propertyName, JSC::JSValue, bool shouldThrow); > static bool defineOwnProperty(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow); >@@ -64,7 +64,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; > protected: > JSTestNamedAndIndexedSetterNoIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedAndIndexedSetterNoIdentifier>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp (working copy) >@@ -207,7 +207,7 @@ bool JSTestNamedAndIndexedSetterThrowing > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedAndIndexedSetterThrowingException::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedAndIndexedSetterThrowingException::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedAndIndexedSetterThrowingException*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedAndIndexedSetterThrowingException* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool put(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); > static bool putByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned propertyName, JSC::JSValue, bool shouldThrow); > static bool defineOwnProperty(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow); >@@ -64,7 +64,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; > protected: > JSTestNamedAndIndexedSetterThrowingException(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedAndIndexedSetterThrowingException>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp (working copy) >@@ -216,7 +216,7 @@ bool JSTestNamedAndIndexedSetterWithIden > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedAndIndexedSetterWithIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedAndIndexedSetterWithIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedAndIndexedSetterWithIdentifier*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedAndIndexedSetterWithIdentifier* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool put(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); > static bool putByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned propertyName, JSC::JSValue, bool shouldThrow); > static bool defineOwnProperty(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow); >@@ -64,7 +64,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; > protected: > JSTestNamedAndIndexedSetterWithIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedAndIndexedSetterWithIdentifier>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp (working copy) >@@ -190,7 +190,7 @@ bool JSTestNamedDeleterNoIdentifier::get > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedDeleterNoIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedDeleterNoIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedDeleterNoIdentifier*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedDeleterNoIdentifier* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool deleteProperty(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::DeletePropertySlot&); > static bool deletePropertyByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned); > static void destroy(JSC::JSCell*); >@@ -63,7 +63,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot; > protected: > JSTestNamedDeleterNoIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedDeleterNoIdentifier>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp (working copy) >@@ -190,7 +190,7 @@ bool JSTestNamedDeleterThrowingException > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedDeleterThrowingException::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedDeleterThrowingException::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedDeleterThrowingException*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedDeleterThrowingException* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool deleteProperty(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::DeletePropertySlot&); > static bool deletePropertyByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned); > static void destroy(JSC::JSCell*); >@@ -63,7 +63,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot; > protected: > JSTestNamedDeleterThrowingException(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedDeleterThrowingException>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp (working copy) >@@ -196,7 +196,7 @@ bool JSTestNamedDeleterWithIdentifier::g > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedDeleterWithIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedDeleterWithIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedDeleterWithIdentifier*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedDeleterWithIdentifier* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool deleteProperty(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::DeletePropertySlot&); > static bool deletePropertyByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned); > static void destroy(JSC::JSCell*); >@@ -63,7 +63,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot; > protected: > JSTestNamedDeleterWithIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedDeleterWithIdentifier>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp (working copy) >@@ -207,7 +207,7 @@ bool JSTestNamedDeleterWithIndexedGetter > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedDeleterWithIndexedGetter::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedDeleterWithIndexedGetter::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedDeleterWithIndexedGetter*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedDeleterWithIndexedGetter* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool deleteProperty(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::DeletePropertySlot&); > static bool deletePropertyByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned); > static void destroy(JSC::JSCell*); >@@ -63,7 +63,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot; > protected: > JSTestNamedDeleterWithIndexedGetter(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedDeleterWithIndexedGetter>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp (working copy) >@@ -190,7 +190,7 @@ bool JSTestNamedGetterCallWith::getOwnPr > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedGetterCallWith::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedGetterCallWith::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedGetterCallWith*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedGetterCallWith* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static void destroy(JSC::JSCell*); > > DECLARE_INFO; >@@ -61,7 +61,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot; > protected: > JSTestNamedGetterCallWith(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedGetterCallWith>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp (working copy) >@@ -190,7 +190,7 @@ bool JSTestNamedGetterNoIdentifier::getO > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedGetterNoIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedGetterNoIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedGetterNoIdentifier*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedGetterNoIdentifier* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static void destroy(JSC::JSCell*); > > DECLARE_INFO; >@@ -61,7 +61,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot; > protected: > JSTestNamedGetterNoIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedGetterNoIdentifier>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp (working copy) >@@ -196,7 +196,7 @@ bool JSTestNamedGetterWithIdentifier::ge > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedGetterWithIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedGetterWithIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedGetterWithIdentifier*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedGetterWithIdentifier* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static void destroy(JSC::JSCell*); > > DECLARE_INFO; >@@ -61,7 +61,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot; > protected: > JSTestNamedGetterWithIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedGetterWithIdentifier>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp (working copy) >@@ -190,7 +190,7 @@ bool JSTestNamedSetterNoIdentifier::getO > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedSetterNoIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedSetterNoIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedSetterNoIdentifier*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedSetterNoIdentifier* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool put(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); > static bool putByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned propertyName, JSC::JSValue, bool shouldThrow); > static bool defineOwnProperty(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow); >@@ -64,7 +64,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; > protected: > JSTestNamedSetterNoIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedSetterNoIdentifier>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp (working copy) >@@ -190,7 +190,7 @@ bool JSTestNamedSetterThrowingException: > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedSetterThrowingException::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedSetterThrowingException::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedSetterThrowingException*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedSetterThrowingException* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool put(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); > static bool putByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned propertyName, JSC::JSValue, bool shouldThrow); > static bool defineOwnProperty(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow); >@@ -64,7 +64,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; > protected: > JSTestNamedSetterThrowingException(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedSetterThrowingException>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp (working copy) >@@ -196,7 +196,7 @@ bool JSTestNamedSetterWithIdentifier::ge > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedSetterWithIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedSetterWithIdentifier::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedSetterWithIdentifier*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedSetterWithIdentifier* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool put(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); > static bool putByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned propertyName, JSC::JSValue, bool shouldThrow); > static bool defineOwnProperty(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow); >@@ -64,7 +64,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; > protected: > JSTestNamedSetterWithIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedSetterWithIdentifier>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp (working copy) >@@ -216,7 +216,7 @@ bool JSTestNamedSetterWithIndexedGetter: > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedSetterWithIndexedGetter::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedSetterWithIndexedGetter::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedSetterWithIndexedGetter*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedSetterWithIndexedGetter* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool put(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); > static bool putByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned propertyName, JSC::JSValue, bool shouldThrow); > static bool defineOwnProperty(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow); >@@ -64,7 +64,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; > protected: > JSTestNamedSetterWithIndexedGetter(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedSetterWithIndexedGetter>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp (working copy) >@@ -216,7 +216,7 @@ bool JSTestNamedSetterWithIndexedGetterA > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedSetterWithIndexedGetterAndSetter::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedSetterWithIndexedGetterAndSetter::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedSetterWithIndexedGetterAndSetter*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedSetterWithIndexedGetterAndSetter* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool put(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); > static bool putByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned propertyName, JSC::JSValue, bool shouldThrow); > static bool defineOwnProperty(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow); >@@ -64,7 +64,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; > protected: > JSTestNamedSetterWithIndexedGetterAndSetter(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedSetterWithIndexedGetterAndSetter>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.cpp (working copy) >@@ -190,7 +190,7 @@ bool JSTestNamedSetterWithLegacyOverride > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedSetterWithLegacyOverrideBuiltIns::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedSetterWithLegacyOverrideBuiltIns::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedSetterWithLegacyOverrideBuiltIns*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedSetterWithLegacyOverrideBuiltIns* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool put(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); > static bool putByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned propertyName, JSC::JSValue, bool shouldThrow); > static bool defineOwnProperty(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow); >@@ -64,7 +64,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpure | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpure | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; > protected: > JSTestNamedSetterWithLegacyOverrideBuiltIns(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedSetterWithLegacyOverrideBuiltIns>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.cpp (working copy) >@@ -214,7 +214,7 @@ bool JSTestNamedSetterWithLegacyUnforgea > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedSetterWithLegacyUnforgeableProperties::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedSetterWithLegacyUnforgeableProperties::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedSetterWithLegacyUnforgeableProperties*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedSetterWithLegacyUnforgeableProperties* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool put(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); > static bool putByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned propertyName, JSC::JSValue, bool shouldThrow); > static bool defineOwnProperty(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow); >@@ -64,7 +64,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::HasStaticPropertyTable | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::HasStaticPropertyTable | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; > protected: > JSTestNamedSetterWithLegacyUnforgeableProperties(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedSetterWithLegacyUnforgeableProperties>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.cpp (working copy) >@@ -214,7 +214,7 @@ bool JSTestNamedSetterWithLegacyUnforgea > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.h (working copy) >@@ -41,7 +41,7 @@ public: > static TestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static bool put(JSC::JSCell*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); > static bool putByIndex(JSC::JSCell*, JSC::JSGlobalObject*, unsigned propertyName, JSC::JSValue, bool shouldThrow); > static bool defineOwnProperty(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow); >@@ -64,7 +64,7 @@ public: > static JSC::IsoSubspace* subspaceForImpl(JSC::VM& vm); > static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpure | JSC::HasStaticPropertyTable | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpure | JSC::HasStaticPropertyTable | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; > protected: > JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns>&&); > >Index: Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (working copy) >@@ -2530,7 +2530,7 @@ bool JSTestObj::getOwnPropertySlotByInde > return JSObject::getOwnPropertySlotByIndex(object, lexicalGlobalObject, index, slot); > } > >-void JSTestObj::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void JSTestObj::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = JSC::getVM(lexicalGlobalObject); > auto* thisObject = jsCast<JSTestObj*>(object); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestObj.h >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestObj.h (revision 271116) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestObj.h (working copy) >@@ -44,7 +44,7 @@ public: > static TestObj* toWrapped(JSC::VM&, JSC::JSValue); > static bool getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&); > static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > static JSC::CallData getCallData(JSC::JSCell*); > > static void destroy(JSC::JSCell*); >@@ -85,7 +85,7 @@ public: > static JSC::JSValue testStaticCustomPromiseFunction(JSC::JSGlobalObject&, JSC::CallFrame&, Ref<DeferredPromise>&&); > JSC::JSValue testCustomReturnsOwnPromiseFunction(JSC::JSGlobalObject&, JSC::CallFrame&); > public: >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::HasStaticPropertyTable | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetCallData | JSC::OverridesGetOwnPropertySlot; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::HasStaticPropertyTable | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetCallData | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetOwnPropertySlot; > protected: > JSTestObj(JSC::Structure*, JSDOMGlobalObject&, Ref<TestObj>&&); > >Index: Source/WebCore/bridge/NP_jsobject.cpp >=================================================================== >--- Source/WebCore/bridge/NP_jsobject.cpp (revision 271116) >+++ Source/WebCore/bridge/NP_jsobject.cpp (working copy) >@@ -487,7 +487,7 @@ bool _NPN_Enumerate(NPP, NPObject* o, NP > JSGlobalObject* lexicalGlobalObject = globalObject; > PropertyNameArray propertyNames(vm, PropertyNameMode::Strings, PrivateSymbolMode::Exclude); > >- obj->imp->methodTable(vm)->getPropertyNames(obj->imp, lexicalGlobalObject, propertyNames, EnumerationMode()); >+ obj->imp->getPropertyNames(lexicalGlobalObject, propertyNames, DontEnumPropertiesMode::Exclude); > unsigned size = static_cast<unsigned>(propertyNames.size()); > // FIXME: This should really call NPN_MemAlloc but that's in WebKit > NPIdentifier* identifiers = static_cast<NPIdentifier*>(malloc(sizeof(NPIdentifier) * size)); >Index: Source/WebCore/bridge/runtime_array.cpp >=================================================================== >--- Source/WebCore/bridge/runtime_array.cpp (revision 271116) >+++ Source/WebCore/bridge/runtime_array.cpp (working copy) >@@ -75,7 +75,7 @@ JSC_DEFINE_CUSTOM_GETTER(arrayLengthGett > return JSValue::encode(jsNumber(thisObject->getLength())); > } > >-void RuntimeArray::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode mode) >+void RuntimeArray::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode mode) > { > VM& vm = lexicalGlobalObject->vm(); > RuntimeArray* thisObject = jsCast<RuntimeArray*>(object); >@@ -83,10 +83,10 @@ void RuntimeArray::getOwnPropertyNames(J > for (unsigned i = 0; i < length; ++i) > propertyNames.add(Identifier::from(vm, i)); > >- if (mode.includeDontEnumProperties()) >+ if (mode == DontEnumPropertiesMode::Include) > propertyNames.add(vm.propertyNames->length); > >- JSObject::getOwnPropertyNames(thisObject, lexicalGlobalObject, propertyNames, mode); >+ thisObject->getOwnNonIndexPropertyNames(lexicalGlobalObject, propertyNames, mode); > } > > bool RuntimeArray::getOwnPropertySlot(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyName propertyName, PropertySlot& slot) >Index: Source/WebCore/bridge/runtime_array.h >=================================================================== >--- Source/WebCore/bridge/runtime_array.h (revision 271116) >+++ Source/WebCore/bridge/runtime_array.h (working copy) >@@ -35,7 +35,7 @@ namespace JSC { > class RuntimeArray final : public JSArray { > public: > using Base = JSArray; >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesAnyFormOfGetPropertyNames; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnPropertyNames | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero; > static constexpr bool needsDestruction = true; > > template<typename CellType, JSC::SubspaceAccess> >@@ -59,7 +59,7 @@ public: > ~RuntimeArray(); > static void destroy(JSCell*); > >- static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > static bool getOwnPropertySlot(JSObject*, JSGlobalObject*, PropertyName, PropertySlot&); > static bool getOwnPropertySlotByIndex(JSObject*, JSGlobalObject*, unsigned, PropertySlot&); > static bool put(JSCell*, JSGlobalObject*, PropertyName, JSValue, PutPropertySlot&); >Index: Source/WebCore/bridge/runtime_object.cpp >=================================================================== >--- Source/WebCore/bridge/runtime_object.cpp (revision 271116) >+++ Source/WebCore/bridge/runtime_object.cpp (working copy) >@@ -280,7 +280,7 @@ CallData RuntimeObject::getConstructData > return constructData; > } > >-void RuntimeObject::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, EnumerationMode) >+void RuntimeObject::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNames, DontEnumPropertiesMode) > { > VM& vm = lexicalGlobalObject->vm(); > auto scope = DECLARE_THROW_SCOPE(vm); >Index: Source/WebCore/bridge/runtime_object.h >=================================================================== >--- Source/WebCore/bridge/runtime_object.h (revision 271116) >+++ Source/WebCore/bridge/runtime_object.h (working copy) >@@ -37,7 +37,7 @@ Exception* throwRuntimeObjectInvalidAcce > class WEBCORE_EXPORT RuntimeObject : public JSNonFinalObject { > public: > using Base = JSNonFinalObject; >- static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames | OverridesGetCallData; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetOwnPropertyNames | OverridesGetCallData; > static constexpr bool needsDestruction = true; > > template<typename CellType, JSC::SubspaceAccess> >@@ -64,7 +64,7 @@ public: > static CallData getCallData(JSCell*); > static CallData getConstructData(JSCell*); > >- static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, EnumerationMode); >+ static void getOwnPropertyNames(JSObject*, JSGlobalObject*, PropertyNameArray&, DontEnumPropertiesMode); > > void invalidate(); > >Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 271116) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,20 @@ >+2021-01-01 Alexey Shvayka <shvaikalesh@gmail.com> >+ >+ [JSC] Simplify get*PropertyNames() methods and EnumerationMode >+ https://bugs.webkit.org/show_bug.cgi?id=212954 >+ >+ Reviewed by Yusuke Suzuki. >+ >+ Adjust for changes in JSC's MethodTable, TypeInfo, and EnumerationMode. >+ >+ No new tests, no behavior change. >+ >+ * WebProcess/Plugins/Netscape/JSNPObject.cpp: >+ (WebKit::JSNPObject::getOwnPropertyNames): >+ * WebProcess/Plugins/Netscape/JSNPObject.h: >+ * WebProcess/Plugins/Netscape/NPJSObject.cpp: >+ (WebKit::NPJSObject::enumerate): >+ > 2020-12-23 Said Abou-Hallawa <said@apple.com> > > [GPU Process]: Don't call flushDrawingContext() in the middle of recording drawing commands >Index: Source/WebKit/WebProcess/Plugins/Netscape/JSNPObject.cpp >=================================================================== >--- Source/WebKit/WebProcess/Plugins/Netscape/JSNPObject.cpp (revision 271116) >+++ Source/WebKit/WebProcess/Plugins/Netscape/JSNPObject.cpp (working copy) >@@ -425,7 +425,7 @@ bool JSNPObject::deleteProperty(JSGlobal > return true; > } > >-void JSNPObject::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNameArray, EnumerationMode) >+void JSNPObject::getOwnPropertyNames(JSObject* object, JSGlobalObject* lexicalGlobalObject, PropertyNameArray& propertyNameArray, DontEnumPropertiesMode) > { > VM& vm = lexicalGlobalObject->vm(); > auto scope = DECLARE_THROW_SCOPE(vm); >Index: Source/WebKit/WebProcess/Plugins/Netscape/JSNPObject.h >=================================================================== >--- Source/WebKit/WebProcess/Plugins/Netscape/JSNPObject.h (revision 271116) >+++ Source/WebKit/WebProcess/Plugins/Netscape/JSNPObject.h (working copy) >@@ -44,7 +44,7 @@ class NPRuntimeObjectMap; > class JSNPObject final : public JSC::JSDestructibleObject { > public: > using Base = JSC::JSDestructibleObject; >- static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::OverridesGetOwnPropertySlot | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetCallData; >+ static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::OverridesGetOwnPropertySlot | JSC::OverridesGetOwnPropertyNames | JSC::OverridesGetCallData; > > template<typename CellType, JSC::SubspaceAccess> > static JSC::IsoSubspace* subspaceFor(JSC::VM& vm) >@@ -99,7 +99,7 @@ private: > > bool deleteProperty(JSC::JSGlobalObject*, NPIdentifier propertyName); > >- static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode); >+ static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::DontEnumPropertiesMode); > > NPRuntimeObjectMap* m_objectMap; > NPObject* m_npObject; >Index: Source/WebKit/WebProcess/Plugins/Netscape/NPJSObject.cpp >=================================================================== >--- Source/WebKit/WebProcess/Plugins/Netscape/NPJSObject.cpp (revision 271116) >+++ Source/WebKit/WebProcess/Plugins/Netscape/NPJSObject.cpp (working copy) >@@ -253,7 +253,7 @@ bool NPJSObject::enumerate(NPIdentifier* > JSLockHolder lock(vm); > > PropertyNameArray propertyNames(vm, PropertyNameMode::Strings, PrivateSymbolMode::Exclude); >- m_jsObject->methodTable(vm)->getPropertyNames(m_jsObject.get(), lexicalGlobalObject, propertyNames, EnumerationMode()); >+ m_jsObject->getPropertyNames(lexicalGlobalObject, propertyNames, DontEnumPropertiesMode::Exclude); > > NPIdentifier* nameIdentifiers = npnMemNewArray<NPIdentifier>(propertyNames.size()); > >Index: Source/WebKitLegacy/mac/ChangeLog >=================================================================== >--- Source/WebKitLegacy/mac/ChangeLog (revision 271116) >+++ Source/WebKitLegacy/mac/ChangeLog (working copy) >@@ -1,3 +1,13 @@ >+2021-01-01 Alexey Shvayka <shvaikalesh@gmail.com> >+ >+ [JSC] Simplify get*PropertyNames() methods and EnumerationMode >+ https://bugs.webkit.org/show_bug.cgi?id=212954 >+ >+ Reviewed by Yusuke Suzuki. >+ >+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm: >+ (WebKit::NetscapePluginInstanceProxy::enumerate): >+ > 2020-12-19 Rob Buis <rbuis@igalia.com> > > Move FrameLoader::arePluginsEnabled to Frame >Index: Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm >=================================================================== >--- Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm (revision 271116) >+++ Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm (working copy) >@@ -1273,7 +1273,7 @@ bool NetscapePluginInstanceProxy::enumer > JSGlobalObject* lexicalGlobalObject = frame->script().globalObject(pluginWorld()); > > PropertyNameArray propertyNames(vm, PropertyNameMode::Strings, PrivateSymbolMode::Exclude); >- object->methodTable(vm)->getPropertyNames(object, lexicalGlobalObject, propertyNames, EnumerationMode()); >+ object->getPropertyNames(lexicalGlobalObject, propertyNames, DontEnumPropertiesMode::Exclude); > > RetainPtr<NSMutableArray> array = adoptNS([[NSMutableArray alloc] init]); > for (unsigned i = 0; i < propertyNames.size(); i++) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ews-feeder
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 212954
:
416300
|
416418
|
416886
| 416888