Changeset 262827 in webkit
- Timestamp:
- Jun 9, 2020, 5:21:56 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 64 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r262763 r262827 1 2020-06-09 Mark Lam <mark.lam@apple.com> 2 3 Disambiguate the OverridesGetPropertyNames structure flag 4 https://bugs.webkit.org/show_bug.cgi?id=212909 5 <rdar://problem/63823557> 6 7 Reviewed by Saam Barati. 8 9 * stress/unexpected-stack-overflow-below-JSObject-getPropertyNames.js: Added. 10 1 11 2020-06-08 Ross Kirsling <ross.kirsling@sony.com> 2 12 -
trunk/Source/JavaScriptCore/API/JSAPIValueWrapper.h
r260415 r262827 2 2 * Copyright (C) 1999-2001 Harri Porten (porten@kde.org) 3 3 * Copyright (C) 2001 Peter Kelly (pmk@post.com) 4 * Copyright (C) 2003-20 19Apple Inc. All rights reserved.4 * Copyright (C) 2003-2020 Apple Inc. All rights reserved. 5 5 * 6 6 * This library is free software; you can redistribute it and/or … … 34 34 public: 35 35 using Base = JSCell; 36 static constexpr unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal; 36 37 // OverridesAnyFormOfGetPropertyNames (which used to be OverridesGetPropertyNames) was here 38 // since ancient times back when we pessimistically choose to apply this flag. I think we 39 // can remove it, but we should do more testing before we do so. 40 // Ref: http://trac.webkit.org/changeset/49694/webkit#file9 41 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=212954 42 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesAnyFormOfGetPropertyNames | StructureIsImmortal; 37 43 38 44 template<typename CellType, SubspaceAccess mode> … … 46 52 static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) 47 53 { 48 return Structure::create(vm, globalObject, prototype, TypeInfo(APIValueWrapperType, OverridesGetPropertyNames), info());54 return Structure::create(vm, globalObject, prototype, TypeInfo(APIValueWrapperType, StructureFlags), info()); 49 55 } 50 56 -
trunk/Source/JavaScriptCore/API/JSCallbackObject.h
r260744 r262827 1 1 /* 2 * Copyright (C) 2006-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2006-2020 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 4 * … … 126 126 public: 127 127 using Base = Parent; 128 static constexpr unsigned StructureFlags = Base::StructureFlags | ProhibitsPropertyCaching | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | ImplementsHasInstance | Overrides GetPropertyNames | OverridesGetCallData;128 static constexpr unsigned StructureFlags = Base::StructureFlags | ProhibitsPropertyCaching | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | ImplementsHasInstance | OverridesAnyFormOfGetPropertyNames | OverridesGetCallData; 129 129 static_assert(!(StructureFlags & ImplementsDefaultHasInstance), "using customHasInstance"); 130 130 -
trunk/Source/JavaScriptCore/ChangeLog
r262808 r262827 1 2020-06-09 Mark Lam <mark.lam@apple.com> 2 3 Disambiguate the OverridesGetPropertyNames structure flag 4 https://bugs.webkit.org/show_bug.cgi?id=212909 5 <rdar://problem/63823557> 6 7 Reviewed by Saam Barati. 8 9 Previously, the OverridesGetPropertyNames structure flag could mean 2 different 10 things: 11 1. the getPropertyNames() method is overridden, or 12 2. any of the forms of getPropertyName() is overridden: 13 getPropertyName, getOwnPropertyNames, getOwnNonIndexPropertyNames 14 15 Some parts of the code expects one definition while other parts expect the other. 16 This patch disambiguates between the 2 by introducing OverridesAnyFormOfGetPropertyNames 17 for definition (2). OverridesGetPropertyNames now only means definition (1). 18 19 Note: we could have implemented overridesGetPropertyNames() by doing a comparison 20 of the getPropertyNames pointer in the MethodTable. This is a little slower than 21 checking a TypeInfo flag, but probably doesn't matter a lot in the code paths 22 where overridesGetPropertyNames() is called. However, we have bits in TypeInfo 23 left. So, we'll might as well use it. 24 25 This ambiguity resulted in JSObject::getPropertyNames() recursing infinitely 26 when it didn't think it could recurse. This is demonstrated in 27 JSTests/stress/unexpected-stack-overflow-below-JSObject-getPropertyNames.js as 28 follows: 29 30 1. The test case invokes JSObject::getPropertyNames on a JSArray. 31 32 2. In the while loop at the bottom of JSObject::getPropertynames(), we check 33 `if (prototype->structure(vm)->typeInfo().overridesGetPropertyNames()) {`. 34 35 3. The test overrides proto as follows: 36 `arg0.__proto__ = arr1` where both arg0 and arr1 are JArrays. 37 38 4. In the old code, JSArray sets OverridesGetPropertyNames but does not override 39 getPropertyNames(). It actually meant to set OverridesAnyFormOfGetPropertyNames 40 (after we disambiguated it) because JSArray overrides getOwnNonIndexPropertyNames(). 41 42 5. When we get to the check at (2), we ask if the prototype overridesGetPropertyNames(). 43 Since JSArray sets OverridesGetPropertyNames, the answer is yes / true. 44 45 JSObject::getPropertynames() then proceeds to invoke 46 `prototype->methodTable(vm)->getPropertyNames(prototype, globalObject, propertyNames, mode);` 47 48 But because JSArray does not actually overrides getPropertyNames(), we're 49 actually invoking JSObject::getPropertyNames() here. Viola! Infinite loop. 50 51 With this patch, JSArray is disambiguated to set OverridesAnyFormOfGetPropertyNames 52 instead of OverridesGetPropertyNames, and this infinite loop no longer exists. 53 54 This patch also made the following changes: 55 56 1. Templatized TypeInfo::isSetOnFlags1() and TypeInfo::isSetOnFlags2() so that 57 we can used static_asserts instead of a debug ASSERT to verify the integrity of 58 the flag we're checking against. 59 60 2. Added a Structure::validateFlags() called from the Structure constructor. 61 validateFlags() will verify the following: 62 a. OverridesGetOwnPropertySlot must be set in the flags if getOwnPropertySlot 63 is overridden in the MethodTable. 64 b. InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero must be set in 65 the flags if getOwnPropertySlotByIndex is overridden in the MethodTable. 66 c. HasPutPropertySecurityCheck must be set in the flags if doPutPropertySecurityCheck 67 is overridden in the MethodTable. 68 d. OverridesGetPropertyNames must be set in the flags if getPropertyNames 69 is overridden in the MethodTable. 70 e. OverridesAnyFormOfGetPropertyNames must be set in the flags if any of 71 getPropertyNames, getOwnPropertyNames, or getOwnNonIndexPropertyNames are 72 overridden in the MethodTable. 73 74 An alternate solution would be to automatically set these flags if we detect 75 their corresponding methods are overridden. However, this alternate solution 76 requires this laundry list to be checked every time a structure is constructed. 77 The current implementation of having the required flags already pre-determined 78 as a constant is more efficient in terms of performance and code space. 79 80 Also, it only takes one instantiation of the structure to verify that the flags 81 are valid. Since we only write JSCell / JSObject classes when we need them 82 and we always write tests to exercise new code (especially such classes), we're 83 guaranteed the flags validation will be exercised. 84 85 3. Made JSObject::getOwnPropertySlot() and JSObject::doPutPropertySecurityCheck() 86 not inlined when ASSERT_ENABLED. This is needed in order for Structure::validateFlags() 87 to do its checks using function pointer comparisons. Otherwise, the inline 88 functions can result in multiple instantiations of these functions. For 89 example, WebCore can get its own copy of JSObject::getOwnPropertySlot() and 90 the comparisons will think the function is overridden even when it's not. 91 92 4. Structure::validateFlags() found the following problems which are now fixed: 93 94 GetterSetter was not using its StructureFlags. As a result, it was missing the 95 OverridesGetOwnPropertySlot flag. 96 97 JSDataView did not define its StructureFlags. It was missing the 98 OverridesGetOwnPropertySlot and OverridesAnyFormOfGetPropertyNames flags. 99 100 5. Changed a TypeInfo constructor to not have a default argument for the flags value. 101 Also grepped for all uses of this constructor to make sure that it is passed 102 the StructureFlags field. This exercise found the following issue: 103 104 JSAPIValueWrapper was not using its StructureFlags when creating its structure. 105 Previously, it was just ignoring the StructureIsImmortal flag in StructureFlags. 106 107 6. Hardened the assertions for hasReadOnlyOrGetterSetterPropertiesExcludingProto() 108 and hasGetterSetterProperties() in the Structure constructor. 109 110 Previously, if the flag is set, it verifies that the ClassInfo has the 111 appropriate data expected by the flag. However, it does not assert the reverse 112 i.e. that if the ClassInfo data exists, then the flag must also be set. 113 The new assertions now checks both. 114 115 Moved the overridesGetCallData() assertion into Structure::validateFlags() 116 because it concerns the OverridesGetCallData flag. This assertion has also 117 ben hardened. 118 119 * API/JSAPIValueWrapper.h: 120 * API/JSCallbackObject.h: 121 * debugger/DebuggerScope.h: 122 * inspector/JSInjectedScriptHostPrototype.h: 123 * inspector/JSJavaScriptCallFramePrototype.h: 124 * runtime/ClonedArguments.h: 125 * runtime/ErrorInstance.h: 126 * runtime/GenericArguments.h: 127 * runtime/GetterSetter.h: 128 * runtime/JSArray.h: 129 * runtime/JSDataView.h: 130 * runtime/JSFunction.h: 131 * runtime/JSGenericTypedArrayView.h: 132 * runtime/JSGlobalObject.h: 133 * runtime/JSLexicalEnvironment.h: 134 * runtime/JSModuleEnvironment.h: 135 * runtime/JSModuleNamespaceObject.h: 136 * runtime/JSObject.cpp: 137 (JSC::JSObject::doPutPropertySecurityCheck): 138 (JSC::JSObject::getOwnPropertySlot): 139 * runtime/JSObject.h: 140 (JSC::JSObject::getOwnPropertySlotImpl): 141 (JSC::JSObject::getOwnPropertySlot): 142 * runtime/JSProxy.h: 143 * runtime/JSString.h: 144 * runtime/JSSymbolTableObject.h: 145 * runtime/JSTypeInfo.h: 146 (JSC::TypeInfo::TypeInfo): 147 (JSC::TypeInfo::masqueradesAsUndefined const): 148 (JSC::TypeInfo::implementsHasInstance const): 149 (JSC::TypeInfo::implementsDefaultHasInstance const): 150 (JSC::TypeInfo::overridesGetCallData const): 151 (JSC::TypeInfo::overridesToThis const): 152 (JSC::TypeInfo::structureIsImmortal const): 153 (JSC::TypeInfo::overridesGetPropertyNames const): 154 (JSC::TypeInfo::overridesAnyFormOfGetPropertyNames const): 155 (JSC::TypeInfo::prohibitsPropertyCaching const): 156 (JSC::TypeInfo::getOwnPropertySlotIsImpure const): 157 (JSC::TypeInfo::getOwnPropertySlotIsImpureForPropertyAbsence const): 158 (JSC::TypeInfo::hasPutPropertySecurityCheck const): 159 (JSC::TypeInfo::newImpurePropertyFiresWatchpoints const): 160 (JSC::TypeInfo::isImmutablePrototypeExoticObject const): 161 (JSC::TypeInfo::interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero const): 162 (JSC::TypeInfo::isSetOnFlags1 const): 163 (JSC::TypeInfo::isSetOnFlags2 const): 164 * runtime/ObjectConstructor.cpp: 165 (JSC::objectConstructorAssign): 166 * runtime/ProxyObject.h: 167 * runtime/RegExpObject.h: 168 * runtime/StringObject.h: 169 * runtime/Structure.cpp: 170 (JSC::Structure::validateFlags): 171 (JSC::Structure::Structure): 172 * runtime/Structure.h: 173 * runtime/StructureInlines.h: 174 (JSC::Structure::canCacheOwnKeys const): 175 * tools/JSDollarVM.cpp: 176 1 177 2020-06-09 Jonathan Bedard <jbedard@apple.com> 2 178 -
trunk/Source/JavaScriptCore/debugger/DebuggerScope.h
r261464 r262827 1 1 /* 2 * Copyright (C) 2008-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2008-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 37 37 public: 38 38 using Base = JSNonFinalObject; 39 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | Overrides GetPropertyNames;39 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames; 40 40 41 41 template<typename CellType, SubspaceAccess mode> -
trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHostPrototype.h
r258059 r262827 33 33 public: 34 34 using Base = JSC::JSNonFinalObject; 35 // Do we really need OverridesGetOwnPropertySlot? 36 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=212956 35 37 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::OverridesGetOwnPropertySlot; 36 38 -
trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFramePrototype.h
r258224 r262827 33 33 public: 34 34 using Base = JSC::JSNonFinalObject; 35 // Do we really need OverridesGetOwnPropertySlot? 36 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=212956 35 37 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::OverridesGetOwnPropertySlot; 36 38 -
trunk/Source/JavaScriptCore/runtime/ClonedArguments.h
r257399 r262827 1 1 /* 2 * Copyright (C) 2015-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 41 41 public: 42 42 using Base = JSNonFinalObject; 43 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | Overrides GetPropertyNames;43 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames; 44 44 45 45 template<typename CellType, SubspaceAccess mode> -
trunk/Source/JavaScriptCore/runtime/ErrorInstance.h
r261159 r262827 1 1 /* 2 2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 * Copyright (C) 2008-20 17Apple Inc. All rights reserved.3 * Copyright (C) 2008-2020 Apple Inc. All rights reserved. 4 4 * 5 5 * This library is free software; you can redistribute it and/or … … 30 30 public: 31 31 using Base = JSNonFinalObject; 32 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | Overrides GetPropertyNames;32 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames; 33 33 static constexpr bool needsDestruction = true; 34 34 -
trunk/Source/JavaScriptCore/runtime/GenericArguments.h
r257399 r262827 1 1 /* 2 * Copyright (C) 2015-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 37 37 public: 38 38 typedef JSNonFinalObject Base; 39 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | Overrides GetPropertyNames;39 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesAnyFormOfGetPropertyNames; 40 40 41 41 protected: -
trunk/Source/JavaScriptCore/runtime/GetterSetter.h
r257399 r262827 108 108 static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) 109 109 { 110 return Structure::create(vm, globalObject, prototype, TypeInfo(GetterSetterType ), info());110 return Structure::create(vm, globalObject, prototype, TypeInfo(GetterSetterType, StructureFlags), info()); 111 111 } 112 112 -
trunk/Source/JavaScriptCore/runtime/JSArray.h
r258059 r262827 1 1 /* 2 2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 * Copyright (C) 2003-20 19Apple Inc. All rights reserved.3 * Copyright (C) 2003-2020 Apple Inc. All rights reserved. 4 4 * 5 5 * This library is free software; you can redistribute it and/or … … 41 41 public: 42 42 typedef JSNonFinalObject Base; 43 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | Overrides GetPropertyNames;43 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames; 44 44 45 45 static size_t allocationSize(Checked<size_t> inlineCapacity) -
trunk/Source/JavaScriptCore/runtime/JSDataView.h
r260415 r262827 34 34 public: 35 35 using Base = JSArrayBufferView; 36 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames; 37 36 38 static constexpr unsigned elementSize = 1; 37 39 -
trunk/Source/JavaScriptCore/runtime/JSFunction.h
r260744 r262827 1 1 /* 2 2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 * Copyright (C) 2003-20 19Apple Inc. All rights reserved.3 * Copyright (C) 2003-2020 Apple Inc. All rights reserved. 4 4 * Copyright (C) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca) 5 5 * Copyright (C) 2007 Maks Orlovich … … 71 71 72 72 typedef JSCallee Base; 73 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | Overrides GetPropertyNames | OverridesGetCallData;73 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames | OverridesGetCallData; 74 74 75 75 static size_t allocationSize(Checked<size_t> inlineCapacity) -
trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h
r260415 r262827 1 1 /* 2 * Copyright (C) 2013-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2013-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 97 97 typedef typename Adaptor::Type ElementType; 98 98 99 static constexpr unsigned StructureFlags = Base::StructureFlags | Overrides GetPropertyNames | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero;99 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesAnyFormOfGetPropertyNames | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero; 100 100 101 101 static constexpr unsigned elementSize = sizeof(typename Adaptor::Type); -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r262302 r262827 1 1 /* 2 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 3 * Copyright (C) 2007-20 19Apple Inc. All rights reserved.3 * Copyright (C) 2007-2020 Apple Inc. All rights reserved. 4 4 * 5 5 * This library is free software; you can redistribute it and/or … … 532 532 public: 533 533 using Base = JSSegmentedVariableObject; 534 static constexpr unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable | OverridesGetOwnPropertySlot | OverridesGetPropertyNames | IsImmutablePrototypeExoticObject; 534 // Do we realy need OverridesAnyFormOfGetPropertyNames here? 535 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=212954 536 static constexpr unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames | IsImmutablePrototypeExoticObject; 535 537 536 538 static constexpr bool needsDestruction = true; -
trunk/Source/JavaScriptCore/runtime/JSLexicalEnvironment.h
r257399 r262827 1 1 /* 2 * Copyright (C) 2008-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2008-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 49 49 50 50 using Base = JSSymbolTableObject; 51 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | Overrides GetPropertyNames;51 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames; 52 52 53 53 WriteBarrierBase<Unknown>* variables() -
trunk/Source/JavaScriptCore/runtime/JSModuleEnvironment.h
r259835 r262827 1 1 /* 2 * Copyright (C) 2015-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 41 41 public: 42 42 using Base = JSLexicalEnvironment; 43 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | Overrides GetPropertyNames;43 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames; 44 44 45 45 static JSModuleEnvironment* create(VM& vm, JSGlobalObject* globalObject, JSScope* currentScope, SymbolTable* symbolTable, JSValue initialValue, AbstractModuleRecord* moduleRecord) -
trunk/Source/JavaScriptCore/runtime/JSModuleNamespaceObject.h
r260415 r262827 1 1 /* 2 * Copyright (C) 2015-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 34 34 public: 35 35 using Base = JSNonFinalObject; 36 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | Overrides GetPropertyNames | GetOwnPropertySlotIsImpureForPropertyAbsence | IsImmutablePrototypeExoticObject;36 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesAnyFormOfGetPropertyNames | GetOwnPropertySlotIsImpureForPropertyAbsence | IsImmutablePrototypeExoticObject; 37 37 38 38 static constexpr bool needsDestruction = true; -
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r261755 r262827 670 670 } 671 671 672 #if ASSERT_ENABLED 673 // These needs to be unique (not inlined) for ASSERT_ENABLED builds to enable 674 // Structure::validateFlags() to do checks using function pointer comparisons. 675 676 bool JSObject::getOwnPropertySlot(JSObject* object, JSGlobalObject* globalObject, PropertyName propertyName, PropertySlot& slot) 677 { 678 return getOwnPropertySlotImpl(object, globalObject, propertyName, slot); 679 } 680 681 void JSObject::doPutPropertySecurityCheck(JSObject*, JSGlobalObject*, PropertyName, PutPropertySlot&) 682 { 683 } 684 #endif // ASSERT_ENABLED 685 672 686 // https://tc39.github.io/ecma262/#sec-ordinaryset 673 687 bool ordinarySetSlow(JSGlobalObject* globalObject, JSObject* object, PropertyName propertyName, JSValue value, JSValue receiver, bool shouldThrow) -
trunk/Source/JavaScriptCore/runtime/JSObject.h
r262628 r262827 93 93 class JSFinalObject; 94 94 95 #if ASSERT_ENABLED 96 #define JS_EXPORT_PRIVATE_IF_ASSERT_ENABLED JS_EXPORT_PRIVATE 97 #else 98 #define JS_EXPORT_PRIVATE_IF_ASSERT_ENABLED 99 #endif 100 95 101 class JSObject : public JSCell { 96 102 friend class BatchedTransitionOptimizer; … … 171 177 template<typename CallbackWhenNoException> typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type getPropertySlot(JSGlobalObject*, PropertyName, PropertySlot&, CallbackWhenNoException) const; 172 178 173 static bool getOwnPropertySlot(JSObject*, JSGlobalObject*, PropertyName, PropertySlot&); 179 private: 180 static bool getOwnPropertySlotImpl(JSObject*, JSGlobalObject*, PropertyName, PropertySlot&); 181 public: 182 JS_EXPORT_PRIVATE_IF_ASSERT_ENABLED static bool getOwnPropertySlot(JSObject*, JSGlobalObject*, PropertyName, PropertySlot&); 183 174 184 JS_EXPORT_PRIVATE static bool getOwnPropertySlotByIndex(JSObject*, JSGlobalObject*, unsigned propertyName, PropertySlot&); 175 185 bool getOwnPropertySlotInline(JSGlobalObject*, PropertyName, PropertySlot&); 176 static void doPutPropertySecurityCheck(JSObject*, JSGlobalObject*, PropertyName, PutPropertySlot&);186 JS_EXPORT_PRIVATE_IF_ASSERT_ENABLED static void doPutPropertySecurityCheck(JSObject*, JSGlobalObject*, PropertyName, PutPropertySlot&); 177 187 178 188 // The key difference between this and getOwnPropertySlot is that getOwnPropertySlot … … 1436 1446 // but it makes a big difference to property lookup that derived classes can inline their 1437 1447 // base class call to this. 1438 ALWAYS_INLINE bool JSObject::getOwnPropertySlot (JSObject* object, JSGlobalObject* globalObject, PropertyName propertyName, PropertySlot& slot)1448 ALWAYS_INLINE bool JSObject::getOwnPropertySlotImpl(JSObject* object, JSGlobalObject* globalObject, PropertyName propertyName, PropertySlot& slot) 1439 1449 { 1440 1450 VM& vm = getVM(globalObject); … … 1447 1457 } 1448 1458 1459 #if !ASSERT_ENABLED 1460 ALWAYS_INLINE bool JSObject::getOwnPropertySlot(JSObject* object, JSGlobalObject* globalObject, PropertyName propertyName, PropertySlot& slot) 1461 { 1462 return getOwnPropertySlotImpl(object, globalObject, propertyName, slot); 1463 } 1464 1449 1465 ALWAYS_INLINE void JSObject::doPutPropertySecurityCheck(JSObject*, JSGlobalObject*, PropertyName, PutPropertySlot&) 1450 1466 { 1451 1467 } 1468 #endif 1452 1469 1453 1470 // It may seem crazy to inline a function this large but it makes a big difference -
trunk/Source/JavaScriptCore/runtime/JSProxy.h
r257399 r262827 1 1 /* 2 * Copyright (C) 2011-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2011-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 33 33 public: 34 34 using Base = JSNonFinalObject; 35 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetPropertyNames | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero;35 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetPropertyNames | OverridesAnyFormOfGetPropertyNames | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero; 36 36 37 37 template<typename CellType, SubspaceAccess> -
trunk/Source/JavaScriptCore/runtime/JSString.h
r262570 r262827 90 90 91 91 typedef JSCell Base; 92 // Do we really need OverridesGetOwnPropertySlot? 93 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=212956 94 // Do we really need InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero? 95 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=212958 92 96 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | StructureIsImmortal | OverridesToThis; 93 97 -
trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.h
r257399 r262827 1 1 /* 2 * Copyright (C) 2012-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2012-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 40 40 public: 41 41 using Base = JSScope; 42 static constexpr unsigned StructureFlags = Base::StructureFlags | Overrides GetPropertyNames;42 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesAnyFormOfGetPropertyNames; 43 43 44 44 SymbolTable* symbolTable() const { return m_symbolTable.get(); } -
trunk/Source/JavaScriptCore/runtime/JSTypeInfo.h
r260331 r262827 50 50 static constexpr unsigned ImplementsHasInstance = 1 << 8; 51 51 static constexpr unsigned OverridesGetPropertyNames = 1 << 9; 52 static constexpr unsigned ProhibitsPropertyCaching = 1 << 10; 53 static constexpr unsigned GetOwnPropertySlotIsImpure = 1 << 11; 54 static constexpr unsigned NewImpurePropertyFiresWatchpoints = 1 << 12; 55 static constexpr unsigned IsImmutablePrototypeExoticObject = 1 << 13; 56 static constexpr unsigned GetOwnPropertySlotIsImpureForPropertyAbsence = 1 << 14; 57 static constexpr unsigned InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero = 1 << 15; 58 static constexpr unsigned StructureIsImmortal = 1 << 16; 59 static constexpr unsigned HasPutPropertySecurityCheck = 1 << 17; 52 // OverridesAnyFormOfGetPropertyNames means that we cannot make assumptions about 53 // the cacheability or enumerability of property names, and therefore, we'll need 54 // to disable certain optimizations. This flag should be set if one or more of the 55 // following Object methods are overridden: 56 // getOwnPropertyNames, getOwnNonIndexPropertyNames, getPropertyNames 57 static constexpr unsigned OverridesAnyFormOfGetPropertyNames = 1 << 10; 58 static constexpr unsigned ProhibitsPropertyCaching = 1 << 11; 59 static constexpr unsigned GetOwnPropertySlotIsImpure = 1 << 12; 60 static constexpr unsigned NewImpurePropertyFiresWatchpoints = 1 << 13; 61 static constexpr unsigned IsImmutablePrototypeExoticObject = 1 << 14; 62 static constexpr unsigned GetOwnPropertySlotIsImpureForPropertyAbsence = 1 << 15; 63 static constexpr unsigned InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero = 1 << 16; 64 static constexpr unsigned StructureIsImmortal = 1 << 17; 65 static constexpr unsigned HasPutPropertySecurityCheck = 1 << 18; 60 66 61 67 class TypeInfo { … … 64 70 typedef uint16_t OutOfLineTypeFlags; 65 71 66 TypeInfo(JSType type, unsigned flags = 0)72 TypeInfo(JSType type, unsigned flags) 67 73 : TypeInfo(type, flags & 0xff, flags >> 8) 68 74 { … … 84 90 85 91 unsigned flags() const { return (static_cast<unsigned>(m_flags2) << 8) | static_cast<unsigned>(m_flags); } 86 bool masqueradesAsUndefined() const { return isSetOnFlags1 (MasqueradesAsUndefined); }87 bool implementsHasInstance() const { return isSetOnFlags2 (ImplementsHasInstance); }88 bool implementsDefaultHasInstance() const { return isSetOnFlags1 (ImplementsDefaultHasInstance); }89 bool overridesGetCallData() const { return isSetOnFlags1 (OverridesGetCallData); }92 bool masqueradesAsUndefined() const { return isSetOnFlags1<MasqueradesAsUndefined>(); } 93 bool implementsHasInstance() const { return isSetOnFlags2<ImplementsHasInstance>(); } 94 bool implementsDefaultHasInstance() const { return isSetOnFlags1<ImplementsDefaultHasInstance>(); } 95 bool overridesGetCallData() const { return isSetOnFlags1<OverridesGetCallData>(); } 90 96 bool overridesGetOwnPropertySlot() const { return overridesGetOwnPropertySlot(inlineTypeFlags()); } 91 97 static bool overridesGetOwnPropertySlot(InlineTypeFlags flags) { return flags & OverridesGetOwnPropertySlot; } 92 98 static bool hasStaticPropertyTable(InlineTypeFlags flags) { return flags & HasStaticPropertyTable; } 93 99 static bool perCellBit(InlineTypeFlags flags) { return flags & TypeInfoPerCellBit; } 94 bool overridesToThis() const { return isSetOnFlags1(OverridesToThis); } 95 bool structureIsImmortal() const { return isSetOnFlags2(StructureIsImmortal); } 96 bool overridesGetPropertyNames() const { return isSetOnFlags2(OverridesGetPropertyNames); } 97 bool prohibitsPropertyCaching() const { return isSetOnFlags2(ProhibitsPropertyCaching); } 98 bool getOwnPropertySlotIsImpure() const { return isSetOnFlags2(GetOwnPropertySlotIsImpure); } 99 bool getOwnPropertySlotIsImpureForPropertyAbsence() const { return isSetOnFlags2(GetOwnPropertySlotIsImpureForPropertyAbsence); } 100 bool hasPutPropertySecurityCheck() const { return isSetOnFlags2(HasPutPropertySecurityCheck); } 101 bool newImpurePropertyFiresWatchpoints() const { return isSetOnFlags2(NewImpurePropertyFiresWatchpoints); } 102 bool isImmutablePrototypeExoticObject() const { return isSetOnFlags2(IsImmutablePrototypeExoticObject); } 103 bool interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero() const { return isSetOnFlags2(InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero); } 100 bool overridesToThis() const { return isSetOnFlags1<OverridesToThis>(); } 101 bool structureIsImmortal() const { return isSetOnFlags2<StructureIsImmortal>(); } 102 bool overridesGetPropertyNames() const { return isSetOnFlags2<OverridesGetPropertyNames>(); } 103 bool overridesAnyFormOfGetPropertyNames() const { return isSetOnFlags2<OverridesAnyFormOfGetPropertyNames>(); } 104 bool prohibitsPropertyCaching() const { return isSetOnFlags2<ProhibitsPropertyCaching>(); } 105 bool getOwnPropertySlotIsImpure() const { return isSetOnFlags2<GetOwnPropertySlotIsImpure>(); } 106 bool getOwnPropertySlotIsImpureForPropertyAbsence() const { return isSetOnFlags2<GetOwnPropertySlotIsImpureForPropertyAbsence>(); } 107 bool hasPutPropertySecurityCheck() const { return isSetOnFlags2<HasPutPropertySecurityCheck>(); } 108 bool newImpurePropertyFiresWatchpoints() const { return isSetOnFlags2<NewImpurePropertyFiresWatchpoints>(); } 109 bool isImmutablePrototypeExoticObject() const { return isSetOnFlags2<IsImmutablePrototypeExoticObject>(); } 110 bool interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero() const { return isSetOnFlags2<InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero>(); } 104 111 105 112 static bool isArgumentsType(JSType type) … … 132 139 friend class LLIntOffsetsExtractor; 133 140 134 bool isSetOnFlags1(unsigned flag) const { ASSERT(flag <= (1 << 7)); return m_flags & flag; } 135 bool isSetOnFlags2(unsigned flag) const { ASSERT(flag >= (1 << 8)); return m_flags2 & (flag >> 8); } 141 template<unsigned flag> 142 bool isSetOnFlags1() const 143 { 144 static_assert(flag <= (1 << 7)); 145 return m_flags & flag; 146 } 147 148 template<unsigned flag> 149 bool isSetOnFlags2() const 150 { 151 static_assert(flag >= (1 << 8) && flag <= (1 << 24)); 152 return m_flags2 & (flag >> 8); 153 } 136 154 137 155 JSType m_type; -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp
r261895 r262827 303 303 if (structure->typeInfo().overridesGetOwnPropertySlot()) 304 304 return false; 305 if (structure->typeInfo().overrides GetPropertyNames())305 if (structure->typeInfo().overridesAnyFormOfGetPropertyNames()) 306 306 return false; 307 307 // FIXME: Indexed properties can be handled. -
trunk/Source/JavaScriptCore/runtime/ProxyObject.h
r261159 r262827 35 35 typedef JSNonFinalObject Base; 36 36 37 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetCallData | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesGetPropertyNames | ProhibitsPropertyCaching;37 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetCallData | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesGetPropertyNames | OverridesAnyFormOfGetPropertyNames | ProhibitsPropertyCaching; 38 38 39 39 template<typename CellType, SubspaceAccess mode> -
trunk/Source/JavaScriptCore/runtime/RegExpObject.h
r261159 r262827 31 31 public: 32 32 using Base = JSNonFinalObject; 33 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetPropertyNames ;33 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetPropertyNames | OverridesAnyFormOfGetPropertyNames; 34 34 35 35 template<typename CellType, SubspaceAccess mode> -
trunk/Source/JavaScriptCore/runtime/StringObject.h
r261159 r262827 29 29 public: 30 30 using Base = JSWrapperObject; 31 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | Overrides GetPropertyNames;31 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesAnyFormOfGetPropertyNames; 32 32 33 33 template<typename, SubspaceAccess mode> -
trunk/Source/JavaScriptCore/runtime/Structure.cpp
r262600 r262827 163 163 } 164 164 165 #if ASSERT_ENABLED 166 void Structure::validateFlags() 167 { 168 const MethodTable& methodTable = m_classInfo->methodTable; 169 170 bool overridesGetCallData = methodTable.getCallData != JSCell::getCallData; 171 RELEASE_ASSERT(overridesGetCallData == typeInfo().overridesGetCallData()); 172 173 bool overridesGetOwnPropertySlot = 174 methodTable.getOwnPropertySlot != JSObject::getOwnPropertySlot 175 && methodTable.getOwnPropertySlot != JSCell::getOwnPropertySlot; 176 // We can strengthen this into an equivalence test if there are no classes 177 // that specifies this flag without overriding getOwnPropertySlot. 178 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=212956 179 if (overridesGetOwnPropertySlot) 180 RELEASE_ASSERT(typeInfo().overridesGetOwnPropertySlot()); 181 182 bool overridesGetOwnPropertySlotByIndex = 183 methodTable.getOwnPropertySlotByIndex != JSObject::getOwnPropertySlotByIndex 184 && methodTable.getOwnPropertySlotByIndex != JSCell::getOwnPropertySlotByIndex; 185 // We can strengthen this into an equivalence test if there are no classes 186 // that specifies this flag without overriding getOwnPropertySlotByIndex. 187 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=212958 188 if (overridesGetOwnPropertySlotByIndex) 189 RELEASE_ASSERT(typeInfo().interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero()); 190 191 bool overridesPutPropertySecurityCheck = 192 methodTable.doPutPropertySecurityCheck != JSObject::doPutPropertySecurityCheck 193 && methodTable.doPutPropertySecurityCheck != JSCell::doPutPropertySecurityCheck; 194 RELEASE_ASSERT(overridesPutPropertySecurityCheck == typeInfo().hasPutPropertySecurityCheck()); 195 196 bool overridesGetPropertyNames = 197 methodTable.getPropertyNames != JSObject::getPropertyNames 198 && methodTable.getPropertyNames != JSCell::getPropertyNames; 199 bool overridesGetOwnPropertyNames = 200 methodTable.getOwnPropertyNames != JSObject::getOwnPropertyNames 201 && methodTable.getOwnPropertyNames != JSCell::getOwnPropertyNames; 202 bool overridesGetOwnNonIndexPropertyNames = 203 methodTable.getOwnNonIndexPropertyNames != JSObject::getOwnNonIndexPropertyNames 204 && methodTable.getOwnNonIndexPropertyNames != JSCell::getOwnNonIndexPropertyNames; 205 206 RELEASE_ASSERT(overridesGetPropertyNames == typeInfo().overridesGetPropertyNames()); 207 208 // We can strengthen this into an equivalence test if there are no classes 209 // that specifies this flag without overriding any of the forms of getPropertyNames. 210 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=212954 211 if (overridesGetPropertyNames 212 || overridesGetOwnPropertyNames 213 || overridesGetOwnNonIndexPropertyNames) 214 RELEASE_ASSERT(typeInfo().overridesAnyFormOfGetPropertyNames()); 215 } 216 #else 217 inline void Structure::validateFlags() { } 218 #endif 219 165 220 Structure::Structure(VM& vm, JSGlobalObject* globalObject, JSValue prototype, const TypeInfo& typeInfo, const ClassInfo* classInfo, IndexingType indexingType, unsigned inlineCapacity) 166 221 : JSCell(vm, vm.structureStructure.get()) … … 196 251 ASSERT(static_cast<PropertyOffset>(inlineCapacity) < firstOutOfLineOffset); 197 252 ASSERT(!hasRareData()); 198 ASSERT(hasReadOnlyOrGetterSetterPropertiesExcludingProto() || !m_classInfo->hasStaticSetterOrReadonlyProperties()); 199 ASSERT(hasGetterSetterProperties() || !m_classInfo->hasStaticSetterOrReadonlyProperties()); 200 ASSERT(!this->typeInfo().overridesGetCallData() || m_classInfo->methodTable.getCallData != &JSCell::getCallData); 253 ASSERT(hasReadOnlyOrGetterSetterPropertiesExcludingProto() == m_classInfo->hasStaticSetterOrReadonlyProperties()); 254 ASSERT(hasGetterSetterProperties() == m_classInfo->hasStaticSetterOrReadonlyProperties()); 255 256 validateFlags(); 201 257 } 202 258 -
trunk/Source/JavaScriptCore/runtime/Structure.h
r261567 r262827 174 174 } 175 175 176 void validateFlags(); 177 176 178 public: 177 179 StructureID id() const { return m_blob.structureID(); } -
trunk/Source/JavaScriptCore/runtime/StructureInlines.h
r262600 r262827 268 268 if (hasIndexedProperties(indexingType())) 269 269 return false; 270 if (typeInfo().overrides GetPropertyNames())270 if (typeInfo().overridesAnyFormOfGetPropertyNames()) 271 271 return false; 272 272 return true; -
trunk/Source/JavaScriptCore/tools/JSDollarVM.cpp
r262719 r262827 537 537 public: 538 538 typedef JSArray Base; 539 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | Overrides GetPropertyNames;539 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesAnyFormOfGetPropertyNames; 540 540 541 541 IGNORE_WARNINGS_BEGIN("unused-const-variable") -
trunk/Source/WebCore/ChangeLog
r262826 r262827 1 2020-06-09 Mark Lam <mark.lam@apple.com> 2 3 Disambiguate the OverridesGetPropertyNames structure flag 4 https://bugs.webkit.org/show_bug.cgi?id=212909 5 <rdar://problem/63823557> 6 7 Reviewed by Saam Barati. 8 9 1. JSDOMWindowProperties was not defining its Base. As a result, its 10 StructureFlags was inheriting from JSDOMObject's Base instead of from JSDOMObject 11 as one would expect. This turns out to be harmless because JSDOMObject did not 12 define any StructureFlags. Regardless, this is not fixed so that if JSDOMObject 13 adds any StructureFlags, it will be inherited properly by JSDOMWindowProperties. 14 15 2. Updated CodeGeneratorJS.pm and rebased the binding test results. 16 17 * bindings/js/JSDOMWindowProperties.h: 18 * bindings/scripts/CodeGeneratorJS.pm: 19 (GenerateHeader): 20 * bindings/scripts/test/JS/JSTestEventTarget.h: 21 * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h: 22 * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h: 23 * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h: 24 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h: 25 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h: 26 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h: 27 * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h: 28 * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h: 29 * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h: 30 * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h: 31 * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h: 32 * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h: 33 * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h: 34 * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h: 35 * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h: 36 * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h: 37 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h: 38 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h: 39 * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h: 40 * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h: 41 * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h: 42 * bindings/scripts/test/JS/JSTestObj.h: 43 * bindings/scripts/test/JS/JSTestOverrideBuiltins.h: 44 * bridge/runtime_array.h: 45 * bridge/runtime_object.h: 46 1 47 2020-06-09 Dean Jackson <dino@apple.com> 2 48 -
trunk/Source/WebCore/bindings/js/JSDOMWindowProperties.h
r260992 r262827 33 33 class JSDOMWindowProperties final : public JSDOMObject { 34 34 public: 35 using Base = JSDOMObject; 36 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | JSC::IsImmutablePrototypeExoticObject; 37 35 38 static constexpr bool needsDestruction = false; 36 39 template<typename CellType, JSC::SubspaceAccess> … … 58 61 static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::JSGlobalObject*, unsigned propertyName, JSC::PropertySlot&); 59 62 60 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | JSC::IsImmutablePrototypeExoticObject;61 62 63 private: 63 64 JSDOMWindowProperties(JSC::Structure* structure, JSC::JSGlobalObject& globalObject) -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r262693 r262827 2686 2686 if (InstanceOverridesGetOwnPropertyNames($interface)) { 2687 2687 push(@headerContent, " static void getOwnPropertyNames(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode());\n"); 2688 $structureFlags{"JSC::Overrides GetPropertyNames"} = 1;2688 $structureFlags{"JSC::OverridesAnyFormOfGetPropertyNames"} = 1; 2689 2689 } 2690 2690 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h
r259355 r262827 67 67 } 68 68 public: 69 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::MasqueradesAsUndefined | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames;69 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::MasqueradesAsUndefined | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; 70 70 protected: 71 71 JSTestEventTarget(JSC::Structure*, JSDOMGlobalObject&, Ref<TestEventTarget>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h
r259355 r262827 65 65 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 66 66 public: 67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames;67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; 68 68 protected: 69 69 JSTestIndexedSetterNoIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestIndexedSetterNoIdentifier>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h
r259355 r262827 65 65 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 66 66 public: 67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames;67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; 68 68 protected: 69 69 JSTestIndexedSetterThrowingException(JSC::Structure*, JSDOMGlobalObject&, Ref<TestIndexedSetterThrowingException>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h
r259355 r262827 65 65 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 66 66 public: 67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames;67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; 68 68 protected: 69 69 JSTestIndexedSetterWithIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestIndexedSetterWithIdentifier>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h
r259355 r262827 65 65 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 66 66 public: 67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames| JSC::ProhibitsPropertyCaching;67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; 68 68 protected: 69 69 JSTestNamedAndIndexedSetterNoIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedAndIndexedSetterNoIdentifier>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h
r259355 r262827 65 65 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 66 66 public: 67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames| JSC::ProhibitsPropertyCaching;67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; 68 68 protected: 69 69 JSTestNamedAndIndexedSetterThrowingException(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedAndIndexedSetterThrowingException>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h
r259355 r262827 65 65 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 66 66 public: 67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames| JSC::ProhibitsPropertyCaching;67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; 68 68 protected: 69 69 JSTestNamedAndIndexedSetterWithIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedAndIndexedSetterWithIdentifier>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h
r259355 r262827 64 64 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 65 65 public: 66 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames;66 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; 67 67 protected: 68 68 JSTestNamedDeleterNoIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedDeleterNoIdentifier>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h
r259355 r262827 64 64 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 65 65 public: 66 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames;66 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; 67 67 protected: 68 68 JSTestNamedDeleterThrowingException(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedDeleterThrowingException>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h
r259355 r262827 64 64 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 65 65 public: 66 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames;66 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; 67 67 protected: 68 68 JSTestNamedDeleterWithIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedDeleterWithIdentifier>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h
r259355 r262827 64 64 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 65 65 public: 66 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames;66 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; 67 67 protected: 68 68 JSTestNamedDeleterWithIndexedGetter(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedDeleterWithIndexedGetter>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.h
r259355 r262827 62 62 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 63 63 public: 64 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames;64 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; 65 65 protected: 66 66 JSTestNamedGetterCallWith(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedGetterCallWith>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h
r259355 r262827 62 62 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 63 63 public: 64 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames;64 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; 65 65 protected: 66 66 JSTestNamedGetterNoIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedGetterNoIdentifier>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h
r259355 r262827 62 62 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 63 63 public: 64 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames;64 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; 65 65 protected: 66 66 JSTestNamedGetterWithIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedGetterWithIdentifier>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h
r259355 r262827 65 65 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 66 66 public: 67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames| JSC::ProhibitsPropertyCaching;67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; 68 68 protected: 69 69 JSTestNamedSetterNoIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedSetterNoIdentifier>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h
r259355 r262827 65 65 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 66 66 public: 67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames| JSC::ProhibitsPropertyCaching;67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; 68 68 protected: 69 69 JSTestNamedSetterThrowingException(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedSetterThrowingException>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h
r259355 r262827 65 65 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 66 66 public: 67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames| JSC::ProhibitsPropertyCaching;67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; 68 68 protected: 69 69 JSTestNamedSetterWithIdentifier(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedSetterWithIdentifier>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h
r259355 r262827 65 65 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 66 66 public: 67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames| JSC::ProhibitsPropertyCaching;67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; 68 68 protected: 69 69 JSTestNamedSetterWithIndexedGetter(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedSetterWithIndexedGetter>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h
r259355 r262827 65 65 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 66 66 public: 67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames| JSC::ProhibitsPropertyCaching;67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; 68 68 protected: 69 69 JSTestNamedSetterWithIndexedGetterAndSetter(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedSetterWithIndexedGetterAndSetter>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h
r259355 r262827 65 65 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 66 66 public: 67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpure | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames| JSC::ProhibitsPropertyCaching;67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpure | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; 68 68 protected: 69 69 JSTestNamedSetterWithOverrideBuiltins(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedSetterWithOverrideBuiltins>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h
r259355 r262827 65 65 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 66 66 public: 67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::HasStaticPropertyTable | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames| JSC::ProhibitsPropertyCaching;67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::HasStaticPropertyTable | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; 68 68 protected: 69 69 JSTestNamedSetterWithUnforgableProperties(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedSetterWithUnforgableProperties>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h
r259355 r262827 65 65 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 66 66 public: 67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpure | JSC::HasStaticPropertyTable | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames| JSC::ProhibitsPropertyCaching;67 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpure | JSC::HasStaticPropertyTable | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::ProhibitsPropertyCaching; 68 68 protected: 69 69 JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
r260744 r262827 87 87 JSC::JSValue testCustomReturnsOwnPromiseFunction(JSC::JSGlobalObject&, JSC::CallFrame&); 88 88 public: 89 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::HasStaticPropertyTable | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetCallData | JSC::OverridesGetOwnPropertySlot | JSC::OverridesGetPropertyNames;89 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::HasStaticPropertyTable | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetCallData | JSC::OverridesGetOwnPropertySlot; 90 90 protected: 91 91 JSTestObj(JSC::Structure*, JSDOMGlobalObject&, Ref<TestObj>&&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h
r259355 r262827 62 62 static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&); 63 63 public: 64 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpure | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::Overrides GetOwnPropertySlot | JSC::OverridesGetPropertyNames;64 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpure | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetOwnPropertySlot; 65 65 protected: 66 66 JSTestOverrideBuiltins(JSC::Structure*, JSDOMGlobalObject&, Ref<TestOverrideBuiltins>&&); -
trunk/Source/WebCore/bridge/runtime_array.h
r260415 r262827 36 36 public: 37 37 using Base = JSArray; 38 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | Overrides GetPropertyNames;38 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesAnyFormOfGetPropertyNames; 39 39 static constexpr bool needsDestruction = true; 40 40 -
trunk/Source/WebCore/bridge/runtime_object.h
r260744 r262827 36 36 public: 37 37 using Base = JSNonFinalObject; 38 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | Overrides GetPropertyNames | OverridesGetCallData;38 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesAnyFormOfGetPropertyNames | OverridesGetCallData; 39 39 static constexpr bool needsDestruction = true; 40 40 -
trunk/Source/WebKit/ChangeLog
r262826 r262827 1 2020-06-09 Mark Lam <mark.lam@apple.com> 2 3 Disambiguate the OverridesGetPropertyNames structure flag 4 https://bugs.webkit.org/show_bug.cgi?id=212909 5 <rdar://problem/63823557> 6 7 Reviewed by Saam Barati. 8 9 * WebProcess/Plugins/Netscape/JSNPObject.h: 10 1 11 2020-06-09 Dean Jackson <dino@apple.com> 2 12 -
trunk/Source/WebKit/WebProcess/Plugins/Netscape/JSNPObject.h
r260744 r262827 45 45 public: 46 46 using Base = JSC::JSDestructibleObject; 47 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::OverridesGetOwnPropertySlot | JSC::Overrides GetPropertyNames | JSC::OverridesGetCallData;47 static constexpr unsigned StructureFlags = Base::StructureFlags | JSC::OverridesGetOwnPropertySlot | JSC::OverridesAnyFormOfGetPropertyNames | JSC::OverridesGetCallData; 48 48 49 49 template<typename CellType, JSC::SubspaceAccess>
Note:
See TracChangeset
for help on using the changeset viewer.