Changeset 268710 in webkit
- Timestamp:
- Oct 19, 2020 7:49:07 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 92 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r268688 r268710 1 2020-10-19 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 [WebIDL] %Interface%.prototype.constructor should be defined on [[Set]] receiver 4 https://bugs.webkit.org/show_bug.cgi?id=216533 5 6 Reviewed by Darin Adler. 7 8 * stress/custom-get-set-proto-chain-put.js: Added. 9 1 10 2020-10-19 Mark Cohen <m@mpc.sh> 2 11 -
trunk/LayoutTests/imported/w3c/ChangeLog
r268709 r268710 1 2020-10-19 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 [WebIDL] %Interface%.prototype.constructor should be defined on [[Set]] receiver 4 https://bugs.webkit.org/show_bug.cgi?id=216533 5 6 Reviewed by Darin Adler. 7 8 * web-platform-tests/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver-expected.txt: Added. 9 * web-platform-tests/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver.html: Added. 10 1 11 2020-10-19 Alexey Shvayka <shvaikalesh@gmail.com> 2 12 -
trunk/Source/JavaScriptCore/ChangeLog
r268688 r268710 1 2020-10-19 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 [WebIDL] %Interface%.prototype.constructor should be defined on [[Set]] receiver 4 https://bugs.webkit.org/show_bug.cgi?id=216533 5 6 Reviewed by Darin Adler. 7 8 Before this change, a [[Set]] performed on an %Interface% instance used to overwrite 9 %Interface%.prototype.constructor instead of defining own "constructor" property. 10 11 Since using CustomValue is essential for lazy initialization of WebIDL constructors, 12 and forwarding [[Set]] with correct receiver would require further diverging 13 CustomValue setter signature from CustomAccessor counterpart, this patch makes a 14 CustomValue property without a setter to be treated as a data descriptor [1]. 15 16 This avoids generating a "constructor" setter for every exposed WebIDL interface and 17 making an extra put() dispatch in putInlineSlow(). Changing the semantics is safe 18 because there were no setter-less CustomValue properties before this patch. 19 20 [1]: https://tc39.es/ecma262/#sec-ordinarysetwithowndescriptor (step 3.e.ii) 21 22 * bytecode/AccessCase.cpp: 23 (JSC::AccessCase::generateImpl): 24 * runtime/CustomGetterSetter.cpp: 25 (JSC::callCustomSetter): 26 * runtime/CustomGetterSetter.h: 27 * runtime/JSCJSValue.cpp: 28 (JSC::JSValue::putToPrimitive): Add missing exception check. 29 * runtime/JSCustomGetterSetterFunction.cpp: 30 (JSC::JSC_DEFINE_HOST_FUNCTION): 31 * runtime/JSObject.cpp: 32 (JSC::JSObject::putInlineSlow): 33 * runtime/Lookup.h: 34 (JSC::putEntry): 35 * runtime/PropertySlot.cpp: 36 (JSC::PropertySlot::customGetter const): 37 * runtime/PropertySlot.h: 38 * tools/JSDollarVM.cpp: 39 1 40 2020-10-19 Mark Cohen <m@mpc.sh> 2 41 -
trunk/Source/JavaScriptCore/bytecode/AccessCase.cpp
r266969 r268710 1716 1716 1717 1717 // getter: EncodedJSValue (*GetValueFunc)(JSGlobalObject*, EncodedJSValue thisValue, PropertyName); 1718 // setter: void (*PutValueFunc)(JSGlobalObject*, EncodedJSValue thisObject, EncodedJSValue value); 1719 // Custom values are passed the slotBase (the property holder), custom accessors are passed the thisVaule (receiver). 1720 // FIXME: Remove this differences in custom values and custom accessors. 1721 // https://bugs.webkit.org/show_bug.cgi?id=158014 1718 // setter: bool (*PutValueFunc)(JSGlobalObject*, EncodedJSValue thisObject, EncodedJSValue value); 1719 // Custom values are passed the slotBase (the property holder), custom accessors are passed the thisValue (receiver). 1722 1720 GPRReg baseForCustom = takesPropertyOwnerAsCFunctionArgument ? propertyOwnerGPR : receiverForCustomGetGPR; 1723 1721 // We do not need to keep globalObject alive since the owner CodeBlock (even if JSGlobalObject* is one of CodeBlock that is inlined and held by DFG CodeBlock) -
trunk/Source/JavaScriptCore/runtime/CustomGetterSetter.cpp
r261755 r268710 36 36 const ClassInfo CustomGetterSetter::s_info = { "CustomGetterSetter", nullptr, nullptr, nullptr, CREATE_METHOD_TABLE(CustomGetterSetter) }; 37 37 38 bool callCustomSetter(JSGlobalObject* globalObject, CustomGetterSetter::CustomSetter setter, bool isAccessor, JSValue thisValue, JSValue value)38 TriState callCustomSetter(JSGlobalObject* globalObject, CustomGetterSetter::CustomSetter setter, bool isAccessor, JSObject* slotBase, JSValue thisValue, JSValue value) 39 39 { 40 ASSERT(setter);41 bool result = setter(globalObject, JSValue::encode(thisValue), JSValue::encode(value));42 // Always return true if there is a setter and it is observed as an accessor to users.43 if (isAccessor)44 return true;45 return result;46 }40 if (isAccessor) { 41 if (!setter) 42 return TriState::False; 43 setter(globalObject, JSValue::encode(thisValue), JSValue::encode(value)); 44 // Always return true if there is a setter and it is observed as an accessor to users. 45 return TriState::True; 46 } 47 47 48 bool callCustomSetter(JSGlobalObject* globalObject, JSValue customGetterSetter, bool isAccessor, JSObject* base, JSValue thisValue, JSValue value)49 {50 CustomGetterSetter::CustomSetter setter = jsCast<CustomGetterSetter*>(customGetterSetter)->setter();51 // Return false since there is no setter.52 48 if (!setter) 53 return false; 54 // FIXME: Remove this differences in custom values and custom accessors. 55 // https://bugs.webkit.org/show_bug.cgi?id=158014 56 if (!isAccessor) 57 thisValue = base; 58 return callCustomSetter(globalObject, setter, isAccessor, thisValue, value); 49 return TriState::Indeterminate; 50 return triState(setter(globalObject, JSValue::encode(slotBase), JSValue::encode(value))); 59 51 } 60 52 -
trunk/Source/JavaScriptCore/runtime/CustomGetterSetter.h
r253319 r268710 77 77 }; 78 78 79 JS_EXPORT_PRIVATE bool callCustomSetter(JSGlobalObject*, CustomGetterSetter::CustomSetter, bool isAccessor, JSValue thisValue, JSValue); 80 JS_EXPORT_PRIVATE bool callCustomSetter(JSGlobalObject*, JSValue customGetterSetter, bool isAccessor, JSObject* slotBase, JSValue thisValue, JSValue); 79 JS_EXPORT_PRIVATE TriState callCustomSetter(JSGlobalObject*, CustomGetterSetter::CustomSetter, bool isAccessor, JSObject* slotBase, JSValue thisValue, JSValue); 81 80 82 81 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp
r267348 r268710 214 214 RELEASE_AND_RETURN(scope, callSetter(globalObject, *this, gs, value, slot.isStrictMode() ? ECMAMode::strict() : ECMAMode::sloppy())); 215 215 216 if (gs.isCustomGetterSetter()) 217 return callCustomSetter(globalObject, gs, attributes & PropertyAttribute::CustomAccessor, obj, slot.thisValue(), value); 216 if (gs.isCustomGetterSetter()) { 217 auto setter = jsCast<CustomGetterSetter*>(gs.asCell())->setter(); 218 bool isAccessor = attributes & PropertyAttribute::CustomAccessor; 219 auto result = callCustomSetter(globalObject, setter, isAccessor, obj, slot.thisValue(), value); 220 if (result != TriState::Indeterminate) 221 RELEASE_AND_RETURN(scope, result == TriState::True); 222 } 218 223 219 224 // If there's an existing property on the object or one of its -
trunk/Source/JavaScriptCore/runtime/JSCustomGetterSetterFunction.cpp
r267594 r268710 49 49 ASSERT(setter); 50 50 scope.release(); 51 callCustomSetter(globalObject, setter, true, thisValue, callFrame->argument(0));51 setter(globalObject, JSValue::encode(thisValue), JSValue::encode(callFrame->argument(0))); 52 52 return JSValue::encode(jsUndefined()); 53 53 } -
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r268442 r268710 850 850 } 851 851 if (gs.isCustomGetterSetter()) { 852 bool isAccessor = attributes & PropertyAttribute::CustomAccessor; 853 auto setter = jsCast<CustomGetterSetter*>(gs.asCell())->setter(); 852 854 // FIXME: We should only be caching these if we're not an uncacheable dictionary: 853 855 // https://bugs.webkit.org/show_bug.cgi?id=215347 854 856 855 857 // We need to make sure that we decide to cache this property before we potentially execute aribitrary JS. 856 if ( attributes & PropertyAttribute::CustomAccessor)857 slot.setCustomAccessor(obj, jsCast<CustomGetterSetter*>(gs.asCell())->setter());858 if (isAccessor) 859 slot.setCustomAccessor(obj, setter); 858 860 else 859 slot.setCustomValue(obj, jsCast<CustomGetterSetter*>(gs.asCell())->setter());860 861 bool result = callCustomSetter(globalObject, gs, attributes & PropertyAttribute::CustomAccessor, obj, slot.thisValue(), value);861 slot.setCustomValue(obj, setter); 862 863 auto result = callCustomSetter(globalObject, setter, isAccessor, obj, slot.thisValue(), value); 862 864 RETURN_IF_EXCEPTION(scope, false); 863 return result; 865 if (result != TriState::Indeterminate) 866 return result == TriState::True; 864 867 } 865 868 ASSERT(!(attributes & PropertyAttribute::Accessor)); -
trunk/Source/JavaScriptCore/runtime/Lookup.h
r267727 r268710 276 276 // If this is a function or lazy property put then we just do the put because 277 277 // logically the object already had the property, so this is just a replace. 278 // FIXME: thisValue may be an object with non-extensible structure we must throw for. 278 279 if (JSObject* thisObject = jsDynamicCast<JSObject*>(vm, thisValue)) 279 280 thisObject->putDirect(vm, propertyName, value); … … 289 290 ASSERT_WITH_MESSAGE(!(entry->attributes() & PropertyAttribute::DOMJITAttribute), "DOMJITAttribute supports readonly attributes currently."); 290 291 bool isAccessor = entry->attributes() & PropertyAttribute::CustomAccessor; 291 JSValue updateThisValue = entry->attributes() & PropertyAttribute::CustomAccessor ? slot.thisValue() : JSValue(base); 292 // FIXME: We should only be caching these if we're not an uncacheable dictionary: 293 // https://bugs.webkit.org/show_bug.cgi?id=215347 292 294 // We need to make sure that we decide to cache this property before we potentially execute aribitrary JS. 293 295 if (isAccessor) … … 296 298 slot.setCustomValue(base, entry->propertyPutter()); 297 299 298 bool result = callCustomSetter(globalObject, entry->propertyPutter(), isAccessor, updateThisValue, value);300 auto result = callCustomSetter(globalObject, entry->propertyPutter(), isAccessor, base, slot.thisValue(), value); 299 301 RETURN_IF_EXCEPTION(scope, false); 300 return result; 302 if (result != TriState::Indeterminate) 303 return result == TriState::True; 304 305 // FIXME: thisValue may be an object with non-extensible structure we must throw for. 306 if (JSObject* thisObject = jsDynamicCast<JSObject*>(vm, thisValue)) 307 thisObject->putDirect(vm, propertyName, value); 308 return true; 301 309 } 302 310 -
trunk/Source/JavaScriptCore/runtime/PropertySlot.cpp
r261755 r268710 36 36 JSValue PropertySlot::customGetter(JSGlobalObject* globalObject, PropertyName propertyName) const 37 37 { 38 // FIXME: Remove this differences in custom values and custom accessors.39 // https://bugs.webkit.org/show_bug.cgi?id=15801440 38 JSValue thisValue = m_attributes & PropertyAttribute::CustomAccessor ? m_thisValue : JSValue(slotBase()); 41 39 if (auto domAttribute = this->domAttribute()) { -
trunk/Source/JavaScriptCore/runtime/PropertySlot.h
r267727 r268710 122 122 } 123 123 124 // FIXME: Remove this slotBase / receiver behavior difference in custom values and custom accessors.125 // https://bugs.webkit.org/show_bug.cgi?id=158014126 124 using GetValueFunc = EncodedJSValue(JIT_OPERATION_ATTRIBUTES*)(JSGlobalObject*, EncodedJSValue thisValue, PropertyName); 127 125 -
trunk/Source/JavaScriptCore/tools/JSDollarVM.cpp
r268587 r268710 1561 1561 1562 1562 JSValue value = JSValue::decode(encodedValue); 1563 RELEASE_ASSERT(value.isObject()); 1563 if (!value.isObject()) 1564 return false; 1565 1564 1566 JSObject* object = asObject(value); 1565 1567 PutPropertySlot slot(object); … … 1577 1579 1578 1580 JSValue value = JSValue::decode(encodedValue); 1579 RELEASE_ASSERT(value.isObject()); 1581 if (!value.isObject()) 1582 return false; 1583 1580 1584 JSObject* object = asObject(value); 1581 1585 PutPropertySlot slot(object); … … 1614 1618 CustomGetterSetter::create(vm, customGetValueGlobalObject, nullptr), 0); 1615 1619 putDirectCustomAccessor(vm, Identifier::fromString(vm, "customAccessorGlobalObject"), 1616 CustomGetterSetter::create(vm, customGetAccessorGlobalObject, nullptr), static_cast<unsigned>(PropertyAttribute::CustomAccessor));1620 CustomGetterSetter::create(vm, customGetAccessorGlobalObject, nullptr), PropertyAttribute::ReadOnly | PropertyAttribute::CustomAccessor); 1617 1621 1618 1622 putDirectCustomAccessor(vm, Identifier::fromString(vm, "customFunction"), -
trunk/Source/WebCore/ChangeLog
r268709 r268710 1 2020-10-19 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 [WebIDL] %Interface%.prototype.constructor should be defined on [[Set]] receiver 4 https://bugs.webkit.org/show_bug.cgi?id=216533 5 6 Reviewed by Darin Adler. 7 8 1. Create a setter-less CustomGetterSetter instead of generating "constructor" setter. 9 2. Remove unused $needsConstructorTable variable. 10 3. Remove [LegacyNoInterfaceObject] branch as it's precluded by NeedsConstructorProperty. 11 12 Test: imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver.html 13 14 * bindings/scripts/CodeGeneratorJS.pm: 15 (GeneratePropertiesHashTable): 16 (GenerateImplementation): 17 * bindings/scripts/test/JS/*: Updated. 18 1 19 2020-10-19 Alexey Shvayka <shvaikalesh@gmail.com> 2 20 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r268564 r268710 3382 3382 push(@$hashValue1, $getter); 3383 3383 3384 my $setter = "setJS" . $interfaceName . "Constructor"; 3385 push(@$hashValue2, $setter); 3384 push(@$hashValue2, "0"); 3386 3385 push(@$hashSpecials, "static_cast<unsigned>(JSC::PropertyAttribute::DontEnum)"); 3387 3386 } … … 4320 4319 my $constructorGetter = "js" . $interfaceName . "Constructor"; 4321 4320 push(@implContent, "JSC_DECLARE_CUSTOM_GETTER(${constructorGetter});\n"); 4322 4323 my $constructorSetter = "setJS" . $interfaceName . "Constructor";4324 push(@implContent, "JSC_DECLARE_CUSTOM_SETTER(${constructorSetter});\n");4325 4321 } 4326 4322 … … 4438 4434 my %conditionals = (); 4439 4435 my %readWriteConditionals = (); 4440 4441 my $needsConstructorTable = 0;4442 4436 4443 4437 foreach my $constant (@{$interface->constants}) { … … 4908 4902 push(@implContent, " if (UNLIKELY(!prototype))\n"); 4909 4903 push(@implContent, " return throwVMTypeError(lexicalGlobalObject, throwScope);\n"); 4910 4911 if (!$interface->extendedAttributes->{LegacyNoInterfaceObject}) { 4912 push(@implContent, " return JSValue::encode(${className}::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject()));\n"); 4913 } else { 4914 push(@implContent, " JSValue constructor = ${className}Constructor::create(JSC::getVM(lexicalGlobalObject), ${className}Constructor::createStructure(JSC::getVM(lexicalGlobalObject), *prototype->globalObject(), prototype->globalObject()->objectPrototype()), *jsCast<JSDOMGlobalObject*>(prototype->globalObject()));\n"); 4915 push(@implContent, " // Shadowing constructor property to ensure reusing the same constructor object\n"); 4916 push(@implContent, " prototype->putDirect(vm, vm.propertyNames->constructor, constructor, static_cast<unsigned>(JSC::PropertyAttribute::DontEnum));\n"); 4917 push(@implContent, " return JSValue::encode(constructor);\n"); 4918 } 4904 push(@implContent, " return JSValue::encode(${className}::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject()));\n"); 4919 4905 push(@implContent, "}\n\n"); 4920 4921 my $constructorSetter = "setJS" . $interfaceName . "Constructor";4922 4923 push(@implContent, "JSC_DEFINE_CUSTOM_SETTER(${constructorSetter}, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))\n");4924 push(@implContent, "{\n");4925 push(@implContent, " VM& vm = JSC::getVM(lexicalGlobalObject);\n");4926 push(@implContent, " auto throwScope = DECLARE_THROW_SCOPE(vm);\n");4927 push(@implContent, " auto* prototype = jsDynamicCast<${className}Prototype*>(vm, JSValue::decode(thisValue));\n");4928 push(@implContent, " if (UNLIKELY(!prototype)) {\n");4929 push(@implContent, " throwVMTypeError(lexicalGlobalObject, throwScope);\n");4930 push(@implContent, " return false;\n");4931 push(@implContent, " }\n");4932 push(@implContent, " // Shadowing a built-in constructor\n");4933 push(@implContent, " return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));\n");4934 push(@implContent, "}\n\n");4935 4936 4906 } 4937 4907 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSDOMWindow.cpp
r268551 r268710 62 62 63 63 JSC_DECLARE_CUSTOM_GETTER(jsDOMWindowConstructor); 64 JSC_DECLARE_CUSTOM_SETTER(setJSDOMWindowConstructor);65 64 JSC_DECLARE_CUSTOM_GETTER(jsDOMWindow_DOMWindowConstructor); 66 65 JSC_DECLARE_CUSTOM_SETTER(setJSDOMWindow_DOMWindowConstructor); … … 179 178 static const HashTableValue JSDOMWindowPrototypeTableValues[] = 180 179 { 181 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSDOMWindowConstructor) } },180 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 182 181 }; 183 182 … … 227 226 return throwVMTypeError(lexicalGlobalObject, throwScope); 228 227 return JSValue::encode(JSDOMWindow::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 229 }230 231 JSC_DEFINE_CUSTOM_SETTER(setJSDOMWindowConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))232 {233 VM& vm = JSC::getVM(lexicalGlobalObject);234 auto throwScope = DECLARE_THROW_SCOPE(vm);235 auto* prototype = jsDynamicCast<JSDOMWindowPrototype*>(vm, JSValue::decode(thisValue));236 if (UNLIKELY(!prototype)) {237 throwVMTypeError(lexicalGlobalObject, throwScope);238 return false;239 }240 // Shadowing a built-in constructor241 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));242 228 } 243 229 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSDedicatedWorkerGlobalScope.cpp
r268551 r268710 48 48 49 49 JSC_DECLARE_CUSTOM_GETTER(jsDedicatedWorkerGlobalScopeConstructor); 50 JSC_DECLARE_CUSTOM_SETTER(setJSDedicatedWorkerGlobalScopeConstructor);51 50 JSC_DECLARE_CUSTOM_GETTER(jsDedicatedWorkerGlobalScope_DedicatedWorkerGlobalScopeConstructor); 52 51 JSC_DECLARE_CUSTOM_SETTER(setJSDedicatedWorkerGlobalScope_DedicatedWorkerGlobalScopeConstructor); … … 92 91 static const HashTableValue JSDedicatedWorkerGlobalScopePrototypeTableValues[] = 93 92 { 94 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDedicatedWorkerGlobalScopeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSDedicatedWorkerGlobalScopeConstructor) } },93 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDedicatedWorkerGlobalScopeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 95 94 }; 96 95 … … 138 137 return throwVMTypeError(lexicalGlobalObject, throwScope); 139 138 return JSValue::encode(JSDedicatedWorkerGlobalScope::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 140 }141 142 JSC_DEFINE_CUSTOM_SETTER(setJSDedicatedWorkerGlobalScopeConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))143 {144 VM& vm = JSC::getVM(lexicalGlobalObject);145 auto throwScope = DECLARE_THROW_SCOPE(vm);146 auto* prototype = jsDynamicCast<JSDedicatedWorkerGlobalScopePrototype*>(vm, JSValue::decode(thisValue));147 if (UNLIKELY(!prototype)) {148 throwVMTypeError(lexicalGlobalObject, throwScope);149 return false;150 }151 // Shadowing a built-in constructor152 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));153 139 } 154 140 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp
r268551 r268710 93 93 94 94 JSC_DECLARE_CUSTOM_GETTER(jsExposedToWorkerAndWindowConstructor); 95 JSC_DECLARE_CUSTOM_SETTER(setJSExposedToWorkerAndWindowConstructor);96 95 97 96 class JSExposedToWorkerAndWindowPrototype final : public JSC::JSNonFinalObject { … … 165 164 static const HashTableValue JSExposedToWorkerAndWindowPrototypeTableValues[] = 166 165 { 167 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsExposedToWorkerAndWindowConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSExposedToWorkerAndWindowConstructor) } },166 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsExposedToWorkerAndWindowConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 168 167 { "doSomething", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsExposedToWorkerAndWindowPrototypeFunction_doSomething), (intptr_t) (0) } }, 169 168 }; … … 228 227 return throwVMTypeError(lexicalGlobalObject, throwScope); 229 228 return JSValue::encode(JSExposedToWorkerAndWindow::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 230 }231 232 JSC_DEFINE_CUSTOM_SETTER(setJSExposedToWorkerAndWindowConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))233 {234 VM& vm = JSC::getVM(lexicalGlobalObject);235 auto throwScope = DECLARE_THROW_SCOPE(vm);236 auto* prototype = jsDynamicCast<JSExposedToWorkerAndWindowPrototype*>(vm, JSValue::decode(thisValue));237 if (UNLIKELY(!prototype)) {238 throwVMTypeError(lexicalGlobalObject, throwScope);239 return false;240 }241 // Shadowing a built-in constructor242 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));243 229 } 244 230 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSPaintWorkletGlobalScope.cpp
r268551 r268710 48 48 49 49 JSC_DECLARE_CUSTOM_GETTER(jsPaintWorkletGlobalScopeConstructor); 50 JSC_DECLARE_CUSTOM_SETTER(setJSPaintWorkletGlobalScopeConstructor);51 50 JSC_DECLARE_CUSTOM_GETTER(jsPaintWorkletGlobalScope_PaintWorkletGlobalScopeConstructor); 52 51 JSC_DECLARE_CUSTOM_SETTER(setJSPaintWorkletGlobalScope_PaintWorkletGlobalScopeConstructor); … … 92 91 static const HashTableValue JSPaintWorkletGlobalScopePrototypeTableValues[] = 93 92 { 94 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsPaintWorkletGlobalScopeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSPaintWorkletGlobalScopeConstructor) } },93 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsPaintWorkletGlobalScopeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 95 94 }; 96 95 … … 138 137 return throwVMTypeError(lexicalGlobalObject, throwScope); 139 138 return JSValue::encode(JSPaintWorkletGlobalScope::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 140 }141 142 JSC_DEFINE_CUSTOM_SETTER(setJSPaintWorkletGlobalScopeConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))143 {144 VM& vm = JSC::getVM(lexicalGlobalObject);145 auto throwScope = DECLARE_THROW_SCOPE(vm);146 auto* prototype = jsDynamicCast<JSPaintWorkletGlobalScopePrototype*>(vm, JSValue::decode(thisValue));147 if (UNLIKELY(!prototype)) {148 throwVMTypeError(lexicalGlobalObject, throwScope);149 return false;150 }151 // Shadowing a built-in constructor152 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));153 139 } 154 140 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSServiceWorkerGlobalScope.cpp
r268551 r268710 48 48 49 49 JSC_DECLARE_CUSTOM_GETTER(jsServiceWorkerGlobalScopeConstructor); 50 JSC_DECLARE_CUSTOM_SETTER(setJSServiceWorkerGlobalScopeConstructor);51 50 JSC_DECLARE_CUSTOM_GETTER(jsServiceWorkerGlobalScope_ServiceWorkerGlobalScopeConstructor); 52 51 JSC_DECLARE_CUSTOM_SETTER(setJSServiceWorkerGlobalScope_ServiceWorkerGlobalScopeConstructor); … … 92 91 static const HashTableValue JSServiceWorkerGlobalScopePrototypeTableValues[] = 93 92 { 94 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsServiceWorkerGlobalScopeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSServiceWorkerGlobalScopeConstructor) } },93 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsServiceWorkerGlobalScopeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 95 94 }; 96 95 … … 138 137 return throwVMTypeError(lexicalGlobalObject, throwScope); 139 138 return JSValue::encode(JSServiceWorkerGlobalScope::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 140 }141 142 JSC_DEFINE_CUSTOM_SETTER(setJSServiceWorkerGlobalScopeConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))143 {144 VM& vm = JSC::getVM(lexicalGlobalObject);145 auto throwScope = DECLARE_THROW_SCOPE(vm);146 auto* prototype = jsDynamicCast<JSServiceWorkerGlobalScopePrototype*>(vm, JSValue::decode(thisValue));147 if (UNLIKELY(!prototype)) {148 throwVMTypeError(lexicalGlobalObject, throwScope);149 return false;150 }151 // Shadowing a built-in constructor152 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));153 139 } 154 140 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp
r268551 r268710 59 59 60 60 JSC_DECLARE_CUSTOM_GETTER(jsTestCEReactionsConstructor); 61 JSC_DECLARE_CUSTOM_SETTER(setJSTestCEReactionsConstructor);62 61 JSC_DECLARE_CUSTOM_GETTER(jsTestCEReactions_attributeWithCEReactions); 63 62 JSC_DECLARE_CUSTOM_SETTER(setJSTestCEReactions_attributeWithCEReactions); … … 126 125 static const HashTableValue JSTestCEReactionsPrototypeTableValues[] = 127 126 { 128 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestCEReactionsConstructor) } },127 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 129 128 { "attributeWithCEReactions", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactions_attributeWithCEReactions), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactions_attributeWithCEReactions) } }, 130 129 { "reflectAttributeWithCEReactions", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactions_reflectAttributeWithCEReactions), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactions_reflectAttributeWithCEReactions) } }, … … 201 200 return throwVMTypeError(lexicalGlobalObject, throwScope); 202 201 return JSValue::encode(JSTestCEReactions::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 203 }204 205 JSC_DEFINE_CUSTOM_SETTER(setJSTestCEReactionsConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))206 {207 VM& vm = JSC::getVM(lexicalGlobalObject);208 auto throwScope = DECLARE_THROW_SCOPE(vm);209 auto* prototype = jsDynamicCast<JSTestCEReactionsPrototype*>(vm, JSValue::decode(thisValue));210 if (UNLIKELY(!prototype)) {211 throwVMTypeError(lexicalGlobalObject, throwScope);212 return false;213 }214 // Shadowing a built-in constructor215 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));216 202 } 217 203 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp
r268551 r268710 54 54 55 55 JSC_DECLARE_CUSTOM_GETTER(jsTestCEReactionsStringifierConstructor); 56 JSC_DECLARE_CUSTOM_SETTER(setJSTestCEReactionsStringifierConstructor);57 56 JSC_DECLARE_CUSTOM_GETTER(jsTestCEReactionsStringifier_value); 58 57 JSC_DECLARE_CUSTOM_SETTER(setJSTestCEReactionsStringifier_value); … … 113 112 static const HashTableValue JSTestCEReactionsStringifierPrototypeTableValues[] = 114 113 { 115 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsStringifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestCEReactionsStringifierConstructor) } },114 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsStringifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 116 115 { "value", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsStringifier_value), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactionsStringifier_value) } }, 117 116 { "valueWithoutReactions", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCEReactionsStringifier_valueWithoutReactions), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCEReactionsStringifier_valueWithoutReactions) } }, … … 183 182 return throwVMTypeError(lexicalGlobalObject, throwScope); 184 183 return JSValue::encode(JSTestCEReactionsStringifier::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 185 }186 187 JSC_DEFINE_CUSTOM_SETTER(setJSTestCEReactionsStringifierConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))188 {189 VM& vm = JSC::getVM(lexicalGlobalObject);190 auto throwScope = DECLARE_THROW_SCOPE(vm);191 auto* prototype = jsDynamicCast<JSTestCEReactionsStringifierPrototype*>(vm, JSValue::decode(thisValue));192 if (UNLIKELY(!prototype)) {193 throwVMTypeError(lexicalGlobalObject, throwScope);194 return false;195 }196 // Shadowing a built-in constructor197 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));198 184 } 199 185 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.cpp
r268551 r268710 69 69 70 70 JSC_DECLARE_CUSTOM_GETTER(jsTestCallTracerConstructor); 71 JSC_DECLARE_CUSTOM_SETTER(setJSTestCallTracerConstructor);72 71 JSC_DECLARE_CUSTOM_GETTER(jsTestCallTracer_testAttributeInterface); 73 72 JSC_DECLARE_CUSTOM_SETTER(setJSTestCallTracer_testAttributeInterface); … … 141 140 static const HashTableValue JSTestCallTracerPrototypeTableValues[] = 142 141 { 143 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCallTracerConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestCallTracerConstructor) } },142 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCallTracerConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 144 143 { "testAttributeInterface", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCallTracer_testAttributeInterface), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCallTracer_testAttributeInterface) } }, 145 144 { "testAttributeSpecified", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestCallTracer_testAttributeSpecified), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestCallTracer_testAttributeSpecified) } }, … … 221 220 return throwVMTypeError(lexicalGlobalObject, throwScope); 222 221 return JSValue::encode(JSTestCallTracer::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 223 }224 225 JSC_DEFINE_CUSTOM_SETTER(setJSTestCallTracerConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))226 {227 VM& vm = JSC::getVM(lexicalGlobalObject);228 auto throwScope = DECLARE_THROW_SCOPE(vm);229 auto* prototype = jsDynamicCast<JSTestCallTracerPrototype*>(vm, JSValue::decode(thisValue));230 if (UNLIKELY(!prototype)) {231 throwVMTypeError(lexicalGlobalObject, throwScope);232 return false;233 }234 // Shadowing a built-in constructor235 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));236 222 } 237 223 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp
r267891 r268710 47 47 48 48 JSC_DECLARE_CUSTOM_GETTER(jsTestClassWithJSBuiltinConstructorConstructor); 49 JSC_DECLARE_CUSTOM_SETTER(setJSTestClassWithJSBuiltinConstructorConstructor);50 49 51 50 class JSTestClassWithJSBuiltinConstructorPrototype final : public JSC::JSNonFinalObject { … … 107 106 static const HashTableValue JSTestClassWithJSBuiltinConstructorPrototypeTableValues[] = 108 107 { 109 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestClassWithJSBuiltinConstructorConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestClassWithJSBuiltinConstructorConstructor) } },108 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestClassWithJSBuiltinConstructorConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 110 109 }; 111 110 … … 164 163 return throwVMTypeError(lexicalGlobalObject, throwScope); 165 164 return JSValue::encode(JSTestClassWithJSBuiltinConstructor::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 166 }167 168 JSC_DEFINE_CUSTOM_SETTER(setJSTestClassWithJSBuiltinConstructorConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))169 {170 VM& vm = JSC::getVM(lexicalGlobalObject);171 auto throwScope = DECLARE_THROW_SCOPE(vm);172 auto* prototype = jsDynamicCast<JSTestClassWithJSBuiltinConstructorPrototype*>(vm, JSValue::decode(thisValue));173 if (UNLIKELY(!prototype)) {174 throwVMTypeError(lexicalGlobalObject, throwScope);175 return false;176 }177 // Shadowing a built-in constructor178 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));179 165 } 180 166 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestConditionalIncludes.cpp
r268551 r268710 88 88 89 89 JSC_DECLARE_CUSTOM_GETTER(jsTestConditionalIncludesConstructor); 90 JSC_DECLARE_CUSTOM_SETTER(setJSTestConditionalIncludesConstructor);91 90 JSC_DECLARE_CUSTOM_GETTER(jsTestConditionalIncludes_testAttr); 92 91 #if ENABLE(Condition22) || ENABLE(Condition23) … … 218 217 static const HashTableValue JSTestConditionalIncludesPrototypeTableValues[] = 219 218 { 220 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestConditionalIncludesConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestConditionalIncludesConstructor) } },219 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestConditionalIncludesConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 221 220 { "testAttr", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestConditionalIncludes_testAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 222 221 #if ENABLE(Condition22) || ENABLE(Condition23) … … 499 498 return throwVMTypeError(lexicalGlobalObject, throwScope); 500 499 return JSValue::encode(JSTestConditionalIncludes::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 501 }502 503 JSC_DEFINE_CUSTOM_SETTER(setJSTestConditionalIncludesConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))504 {505 VM& vm = JSC::getVM(lexicalGlobalObject);506 auto throwScope = DECLARE_THROW_SCOPE(vm);507 auto* prototype = jsDynamicCast<JSTestConditionalIncludesPrototype*>(vm, JSValue::decode(thisValue));508 if (UNLIKELY(!prototype)) {509 throwVMTypeError(lexicalGlobalObject, throwScope);510 return false;511 }512 // Shadowing a built-in constructor513 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));514 500 } 515 501 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestConditionallyReadWrite.cpp
r268551 r268710 56 56 57 57 JSC_DECLARE_CUSTOM_GETTER(jsTestConditionallyReadWriteConstructor); 58 JSC_DECLARE_CUSTOM_SETTER(setJSTestConditionallyReadWriteConstructor);59 58 JSC_DECLARE_CUSTOM_GETTER(jsTestConditionallyReadWrite_conditionallyReadWriteAttribute); 60 59 #if ENABLE(CONDITION) … … 158 157 static const HashTableValue JSTestConditionallyReadWritePrototypeTableValues[] = 159 158 { 160 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestConditionallyReadWriteConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestConditionallyReadWriteConstructor) } },159 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestConditionallyReadWriteConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 161 160 #if ENABLE(CONDITION) 162 161 { "conditionallyReadWriteAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestConditionallyReadWrite_conditionallyReadWriteAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestConditionallyReadWrite_conditionallyReadWriteAttribute) } }, … … 283 282 return throwVMTypeError(lexicalGlobalObject, throwScope); 284 283 return JSValue::encode(JSTestConditionallyReadWrite::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 285 }286 287 JSC_DEFINE_CUSTOM_SETTER(setJSTestConditionallyReadWriteConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))288 {289 VM& vm = JSC::getVM(lexicalGlobalObject);290 auto throwScope = DECLARE_THROW_SCOPE(vm);291 auto* prototype = jsDynamicCast<JSTestConditionallyReadWritePrototype*>(vm, JSValue::decode(thisValue));292 if (UNLIKELY(!prototype)) {293 throwVMTypeError(lexicalGlobalObject, throwScope);294 return false;295 }296 // Shadowing a built-in constructor297 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));298 284 } 299 285 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp
r268551 r268710 74 74 75 75 JSC_DECLARE_CUSTOM_GETTER(jsTestDOMJITConstructor); 76 JSC_DECLARE_CUSTOM_SETTER(setJSTestDOMJITConstructor);77 76 JSC_DECLARE_CUSTOM_GETTER(jsTestDOMJIT_anyAttr); 78 77 JSC_DECLARE_CUSTOM_GETTER(jsTestDOMJIT_booleanAttr); … … 523 522 static const HashTableValue JSTestDOMJITPrototypeTableValues[] = 524 523 { 525 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDOMJITConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestDOMJITConstructor) } },524 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDOMJITConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 526 525 { "anyAttr", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMJITAttribute), NoIntrinsic, { (intptr_t)static_cast<const JSC::DOMJIT::GetterSetter*>(&DOMJITAttributeForTestDOMJITAnyAttr), (intptr_t) (0) } }, 527 526 { "booleanAttr", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMJITAttribute), NoIntrinsic, { (intptr_t)static_cast<const JSC::DOMJIT::GetterSetter*>(&DOMJITAttributeForTestDOMJITBooleanAttr), (intptr_t) (0) } }, … … 626 625 } 627 626 628 JSC_DEFINE_CUSTOM_SETTER(setJSTestDOMJITConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))629 {630 VM& vm = JSC::getVM(lexicalGlobalObject);631 auto throwScope = DECLARE_THROW_SCOPE(vm);632 auto* prototype = jsDynamicCast<JSTestDOMJITPrototype*>(vm, JSValue::decode(thisValue));633 if (UNLIKELY(!prototype)) {634 throwVMTypeError(lexicalGlobalObject, throwScope);635 return false;636 }637 // Shadowing a built-in constructor638 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));639 }640 641 627 static inline JSValue jsTestDOMJIT_anyAttrGetter(JSGlobalObject& lexicalGlobalObject, JSTestDOMJIT& thisObject) 642 628 { -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSON.cpp
r268551 r268710 76 76 77 77 JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSONConstructor); 78 JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSONConstructor);79 78 JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_longAttribute); 80 79 JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSON_enabledBySettingsAttribute); … … 164 163 static const HashTableValue JSTestDefaultToJSONPrototypeTableValues[] = 165 164 { 166 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestDefaultToJSONConstructor) } },165 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 167 166 { "longAttribute", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_longAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 168 167 { "enabledBySettingsAttribute", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSON_enabledBySettingsAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, … … 272 271 } 273 272 274 JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSONConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))275 {276 VM& vm = JSC::getVM(lexicalGlobalObject);277 auto throwScope = DECLARE_THROW_SCOPE(vm);278 auto* prototype = jsDynamicCast<JSTestDefaultToJSONPrototype*>(vm, JSValue::decode(thisValue));279 if (UNLIKELY(!prototype)) {280 throwVMTypeError(lexicalGlobalObject, throwScope);281 return false;282 }283 // Shadowing a built-in constructor284 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));285 }286 287 273 static inline JSValue jsTestDefaultToJSON_longAttributeGetter(JSGlobalObject& lexicalGlobalObject, JSTestDefaultToJSON& thisObject) 288 274 { -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONFilteredByExposed.cpp
r268551 r268710 55 55 56 56 JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSONFilteredByExposedConstructor); 57 JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSONFilteredByExposedConstructor);58 57 JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSONFilteredByExposed_normalAttribute); 59 58 JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSONFilteredByExposed_filteredByExposedWindowAttribute); … … 113 112 static const HashTableValue JSTestDefaultToJSONFilteredByExposedPrototypeTableValues[] = 114 113 { 115 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONFilteredByExposedConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestDefaultToJSONFilteredByExposedConstructor) } },114 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONFilteredByExposedConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 116 115 { "normalAttribute", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONFilteredByExposed_normalAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 117 116 { "filteredByExposedWindowAttribute", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONFilteredByExposed_filteredByExposedWindowAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, … … 201 200 return throwVMTypeError(lexicalGlobalObject, throwScope); 202 201 return JSValue::encode(JSTestDefaultToJSONFilteredByExposed::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 203 }204 205 JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSONFilteredByExposedConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))206 {207 VM& vm = JSC::getVM(lexicalGlobalObject);208 auto throwScope = DECLARE_THROW_SCOPE(vm);209 auto* prototype = jsDynamicCast<JSTestDefaultToJSONFilteredByExposedPrototype*>(vm, JSValue::decode(thisValue));210 if (UNLIKELY(!prototype)) {211 throwVMTypeError(lexicalGlobalObject, throwScope);212 return false;213 }214 // Shadowing a built-in constructor215 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));216 202 } 217 203 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONIndirectInheritance.cpp
r267891 r268710 45 45 46 46 JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSONIndirectInheritanceConstructor); 47 JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSONIndirectInheritanceConstructor);48 47 49 48 class JSTestDefaultToJSONIndirectInheritancePrototype final : public JSC::JSNonFinalObject { … … 99 98 static const HashTableValue JSTestDefaultToJSONIndirectInheritancePrototypeTableValues[] = 100 99 { 101 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONIndirectInheritanceConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestDefaultToJSONIndirectInheritanceConstructor) } },100 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONIndirectInheritanceConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 102 101 }; 103 102 … … 152 151 } 153 152 154 JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSONIndirectInheritanceConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))155 {156 VM& vm = JSC::getVM(lexicalGlobalObject);157 auto throwScope = DECLARE_THROW_SCOPE(vm);158 auto* prototype = jsDynamicCast<JSTestDefaultToJSONIndirectInheritancePrototype*>(vm, JSValue::decode(thisValue));159 if (UNLIKELY(!prototype)) {160 throwVMTypeError(lexicalGlobalObject, throwScope);161 return false;162 }163 // Shadowing a built-in constructor164 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));165 }166 167 153 JSC::IsoSubspace* JSTestDefaultToJSONIndirectInheritance::subspaceForImpl(JSC::VM& vm) 168 154 { -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONInherit.cpp
r268551 r268710 72 72 73 73 JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSONInheritConstructor); 74 JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSONInheritConstructor);75 74 JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSONInherit_inheritLongAttribute); 76 75 JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSONInherit_inheritLongAttribute); … … 128 127 static const HashTableValue JSTestDefaultToJSONInheritPrototypeTableValues[] = 129 128 { 130 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONInheritConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestDefaultToJSONInheritConstructor) } },129 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONInheritConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 131 130 { "inheritLongAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONInherit_inheritLongAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSONInherit_inheritLongAttribute) } }, 132 131 { "toJSON", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestDefaultToJSONInheritPrototypeFunction_toJSON), (intptr_t) (0) } }, … … 191 190 return throwVMTypeError(lexicalGlobalObject, throwScope); 192 191 return JSValue::encode(JSTestDefaultToJSONInherit::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 193 }194 195 JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSONInheritConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))196 {197 VM& vm = JSC::getVM(lexicalGlobalObject);198 auto throwScope = DECLARE_THROW_SCOPE(vm);199 auto* prototype = jsDynamicCast<JSTestDefaultToJSONInheritPrototype*>(vm, JSValue::decode(thisValue));200 if (UNLIKELY(!prototype)) {201 throwVMTypeError(lexicalGlobalObject, throwScope);202 return false;203 }204 // Shadowing a built-in constructor205 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));206 192 } 207 193 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONInheritFinal.cpp
r268551 r268710 72 72 73 73 JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSONInheritFinalConstructor); 74 JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSONInheritFinalConstructor);75 74 JSC_DECLARE_CUSTOM_GETTER(jsTestDefaultToJSONInheritFinal_finalLongAttributeFoo); 76 75 JSC_DECLARE_CUSTOM_SETTER(setJSTestDefaultToJSONInheritFinal_finalLongAttributeFoo); … … 130 129 static const HashTableValue JSTestDefaultToJSONInheritFinalPrototypeTableValues[] = 131 130 { 132 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONInheritFinalConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestDefaultToJSONInheritFinalConstructor) } },131 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONInheritFinalConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 133 132 { "finalLongAttributeFoo", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONInheritFinal_finalLongAttributeFoo), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSONInheritFinal_finalLongAttributeFoo) } }, 134 133 { "finalLongAttributeBar", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDefaultToJSONInheritFinal_finalLongAttributeBar), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestDefaultToJSONInheritFinal_finalLongAttributeBar) } }, … … 194 193 return throwVMTypeError(lexicalGlobalObject, throwScope); 195 194 return JSValue::encode(JSTestDefaultToJSONInheritFinal::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 196 }197 198 JSC_DEFINE_CUSTOM_SETTER(setJSTestDefaultToJSONInheritFinalConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))199 {200 VM& vm = JSC::getVM(lexicalGlobalObject);201 auto throwScope = DECLARE_THROW_SCOPE(vm);202 auto* prototype = jsDynamicCast<JSTestDefaultToJSONInheritFinalPrototype*>(vm, JSValue::decode(thisValue));203 if (UNLIKELY(!prototype)) {204 throwVMTypeError(lexicalGlobalObject, throwScope);205 return false;206 }207 // Shadowing a built-in constructor208 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));209 195 } 210 196 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDomainSecurity.cpp
r268551 r268710 60 60 61 61 JSC_DECLARE_CUSTOM_GETTER(jsTestDomainSecurityConstructor); 62 JSC_DECLARE_CUSTOM_SETTER(setJSTestDomainSecurityConstructor);63 62 JSC_DECLARE_CUSTOM_GETTER(jsTestDomainSecurity_excitingAttr); 64 63 … … 130 129 static const HashTableValue JSTestDomainSecurityPrototypeTableValues[] = 131 130 { 132 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDomainSecurityConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestDomainSecurityConstructor) } },131 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestDomainSecurityConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 133 132 { "excitingFunction", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestDomainSecurityPrototypeFunction_excitingFunction), (intptr_t) (1) } }, 134 133 { "postMessage", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestDomainSecurityPrototypeFunction_postMessage), (intptr_t) (1) } }, … … 200 199 return throwVMTypeError(lexicalGlobalObject, throwScope); 201 200 return JSValue::encode(JSTestDomainSecurity::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 202 }203 204 JSC_DEFINE_CUSTOM_SETTER(setJSTestDomainSecurityConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))205 {206 VM& vm = JSC::getVM(lexicalGlobalObject);207 auto throwScope = DECLARE_THROW_SCOPE(vm);208 auto* prototype = jsDynamicCast<JSTestDomainSecurityPrototype*>(vm, JSValue::decode(thisValue));209 if (UNLIKELY(!prototype)) {210 throwVMTypeError(lexicalGlobalObject, throwScope);211 return false;212 }213 // Shadowing a built-in constructor214 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));215 201 } 216 202 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEnabledBySetting.cpp
r268551 r268710 59 59 60 60 JSC_DECLARE_CUSTOM_GETTER(jsTestEnabledBySettingConstructor); 61 JSC_DECLARE_CUSTOM_SETTER(setJSTestEnabledBySettingConstructor);62 61 JSC_DECLARE_CUSTOM_GETTER(jsTestEnabledBySetting_TestSubObjEnabledBySettingConstructor); 63 62 JSC_DECLARE_CUSTOM_SETTER(setJSTestEnabledBySetting_TestSubObjEnabledBySettingConstructor); … … 142 141 static const HashTableValue JSTestEnabledBySettingPrototypeTableValues[] = 143 142 { 144 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestEnabledBySettingConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestEnabledBySettingConstructor) } },143 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestEnabledBySettingConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 145 144 #if ENABLE(TEST_FEATURE) 146 145 { "enabledBySettingAttribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestEnabledBySetting_enabledBySettingAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestEnabledBySetting_enabledBySettingAttribute) } }, … … 272 271 return throwVMTypeError(lexicalGlobalObject, throwScope); 273 272 return JSValue::encode(JSTestEnabledBySetting::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 274 }275 276 JSC_DEFINE_CUSTOM_SETTER(setJSTestEnabledBySettingConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))277 {278 VM& vm = JSC::getVM(lexicalGlobalObject);279 auto throwScope = DECLARE_THROW_SCOPE(vm);280 auto* prototype = jsDynamicCast<JSTestEnabledBySettingPrototype*>(vm, JSValue::decode(thisValue));281 if (UNLIKELY(!prototype)) {282 throwVMTypeError(lexicalGlobalObject, throwScope);283 return false;284 }285 // Shadowing a built-in constructor286 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));287 273 } 288 274 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEnabledForContext.cpp
r268551 r268710 50 50 51 51 JSC_DECLARE_CUSTOM_GETTER(jsTestEnabledForContextConstructor); 52 JSC_DECLARE_CUSTOM_SETTER(setJSTestEnabledForContextConstructor);53 52 JSC_DECLARE_CUSTOM_GETTER(jsTestEnabledForContext_TestSubObjEnabledForContextConstructor); 54 53 JSC_DECLARE_CUSTOM_SETTER(setJSTestEnabledForContext_TestSubObjEnabledForContextConstructor); … … 107 106 static const HashTableValue JSTestEnabledForContextPrototypeTableValues[] = 108 107 { 109 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestEnabledForContextConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestEnabledForContextConstructor) } },108 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestEnabledForContextConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 110 109 }; 111 110 … … 171 170 return throwVMTypeError(lexicalGlobalObject, throwScope); 172 171 return JSValue::encode(JSTestEnabledForContext::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 173 }174 175 JSC_DEFINE_CUSTOM_SETTER(setJSTestEnabledForContextConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))176 {177 VM& vm = JSC::getVM(lexicalGlobalObject);178 auto throwScope = DECLARE_THROW_SCOPE(vm);179 auto* prototype = jsDynamicCast<JSTestEnabledForContextPrototype*>(vm, JSValue::decode(thisValue));180 if (UNLIKELY(!prototype)) {181 throwVMTypeError(lexicalGlobalObject, throwScope);182 return false;183 }184 // Shadowing a built-in constructor185 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));186 172 } 187 173 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
r268551 r268710 125 125 126 126 JSC_DECLARE_CUSTOM_GETTER(jsTestEventConstructorConstructor); 127 JSC_DECLARE_CUSTOM_SETTER(setJSTestEventConstructorConstructor);128 127 JSC_DECLARE_CUSTOM_GETTER(jsTestEventConstructor_attr1); 129 128 JSC_DECLARE_CUSTOM_GETTER(jsTestEventConstructor_attr2); … … 209 208 static const HashTableValue JSTestEventConstructorPrototypeTableValues[] = 210 209 { 211 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestEventConstructorConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestEventConstructorConstructor) } },210 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestEventConstructorConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 212 211 { "attr1", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestEventConstructor_attr1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 213 212 { "attr2", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestEventConstructor_attr2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, … … 272 271 return throwVMTypeError(lexicalGlobalObject, throwScope); 273 272 return JSValue::encode(JSTestEventConstructor::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 274 }275 276 JSC_DEFINE_CUSTOM_SETTER(setJSTestEventConstructorConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))277 {278 VM& vm = JSC::getVM(lexicalGlobalObject);279 auto throwScope = DECLARE_THROW_SCOPE(vm);280 auto* prototype = jsDynamicCast<JSTestEventConstructorPrototype*>(vm, JSValue::decode(thisValue));281 if (UNLIKELY(!prototype)) {282 throwVMTypeError(lexicalGlobalObject, throwScope);283 return false;284 }285 // Shadowing a built-in constructor286 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));287 273 } 288 274 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
r268551 r268710 56 56 57 57 JSC_DECLARE_CUSTOM_GETTER(jsTestEventTargetConstructor); 58 JSC_DECLARE_CUSTOM_SETTER(setJSTestEventTargetConstructor);59 58 60 59 class JSTestEventTargetPrototype final : public JSC::JSNonFinalObject { … … 110 109 static const HashTableValue JSTestEventTargetPrototypeTableValues[] = 111 110 { 112 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestEventTargetConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestEventTargetConstructor) } },111 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestEventTargetConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 113 112 { "item", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestEventTargetPrototypeFunction_item), (intptr_t) (1) } }, 114 113 }; … … 235 234 return throwVMTypeError(lexicalGlobalObject, throwScope); 236 235 return JSValue::encode(JSTestEventTarget::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 237 }238 239 JSC_DEFINE_CUSTOM_SETTER(setJSTestEventTargetConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))240 {241 VM& vm = JSC::getVM(lexicalGlobalObject);242 auto throwScope = DECLARE_THROW_SCOPE(vm);243 auto* prototype = jsDynamicCast<JSTestEventTargetPrototype*>(vm, JSValue::decode(thisValue));244 if (UNLIKELY(!prototype)) {245 throwVMTypeError(lexicalGlobalObject, throwScope);246 return false;247 }248 // Shadowing a built-in constructor249 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));250 236 } 251 237 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp
r268551 r268710 48 48 49 49 JSC_DECLARE_CUSTOM_GETTER(jsTestExceptionConstructor); 50 JSC_DECLARE_CUSTOM_SETTER(setJSTestExceptionConstructor);51 50 JSC_DECLARE_CUSTOM_GETTER(jsTestException_name); 52 51 … … 104 103 static const HashTableValue JSTestExceptionPrototypeTableValues[] = 105 104 { 106 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestExceptionConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestExceptionConstructor) } },105 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestExceptionConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 107 106 { "name", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestException_name), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 108 107 }; … … 167 166 return throwVMTypeError(lexicalGlobalObject, throwScope); 168 167 return JSValue::encode(JSTestException::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 169 }170 171 JSC_DEFINE_CUSTOM_SETTER(setJSTestExceptionConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))172 {173 VM& vm = JSC::getVM(lexicalGlobalObject);174 auto throwScope = DECLARE_THROW_SCOPE(vm);175 auto* prototype = jsDynamicCast<JSTestExceptionPrototype*>(vm, JSValue::decode(thisValue));176 if (UNLIKELY(!prototype)) {177 throwVMTypeError(lexicalGlobalObject, throwScope);178 return false;179 }180 // Shadowing a built-in constructor181 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));182 168 } 183 169 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp
r268551 r268710 48 48 49 49 JSC_DECLARE_CUSTOM_GETTER(jsTestGenerateIsReachableConstructor); 50 JSC_DECLARE_CUSTOM_SETTER(setJSTestGenerateIsReachableConstructor);51 50 JSC_DECLARE_CUSTOM_GETTER(jsTestGenerateIsReachable_aSecretAttribute); 52 51 … … 104 103 static const HashTableValue JSTestGenerateIsReachablePrototypeTableValues[] = 105 104 { 106 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestGenerateIsReachableConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestGenerateIsReachableConstructor) } },105 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestGenerateIsReachableConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 107 106 { "aSecretAttribute", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestGenerateIsReachable_aSecretAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 108 107 }; … … 177 176 return throwVMTypeError(lexicalGlobalObject, throwScope); 178 177 return JSValue::encode(JSTestGenerateIsReachable::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 179 }180 181 JSC_DEFINE_CUSTOM_SETTER(setJSTestGenerateIsReachableConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))182 {183 VM& vm = JSC::getVM(lexicalGlobalObject);184 auto throwScope = DECLARE_THROW_SCOPE(vm);185 auto* prototype = jsDynamicCast<JSTestGenerateIsReachablePrototype*>(vm, JSValue::decode(thisValue));186 if (UNLIKELY(!prototype)) {187 throwVMTypeError(lexicalGlobalObject, throwScope);188 return false;189 }190 // Shadowing a built-in constructor191 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));192 178 } 193 179 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp
r268551 r268710 149 149 150 150 JSC_DECLARE_CUSTOM_GETTER(jsTestGlobalObjectConstructor); 151 JSC_DECLARE_CUSTOM_SETTER(setJSTestGlobalObjectConstructor);152 151 JSC_DECLARE_CUSTOM_GETTER(jsTestGlobalObject_regularAttribute); 153 152 JSC_DECLARE_CUSTOM_SETTER(setJSTestGlobalObject_regularAttribute); … … 689 688 static const HashTableValue JSTestGlobalObjectPrototypeTableValues[] = 690 689 { 691 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestGlobalObjectConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestGlobalObjectConstructor) } },690 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestGlobalObjectConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 692 691 }; 693 692 … … 784 783 return throwVMTypeError(lexicalGlobalObject, throwScope); 785 784 return JSValue::encode(JSTestGlobalObject::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 786 }787 788 JSC_DEFINE_CUSTOM_SETTER(setJSTestGlobalObjectConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))789 {790 VM& vm = JSC::getVM(lexicalGlobalObject);791 auto throwScope = DECLARE_THROW_SCOPE(vm);792 auto* prototype = jsDynamicCast<JSTestGlobalObjectPrototype*>(vm, JSValue::decode(thisValue));793 if (UNLIKELY(!prototype)) {794 throwVMTypeError(lexicalGlobalObject, throwScope);795 return false;796 }797 // Shadowing a built-in constructor798 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));799 785 } 800 786 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp
r267891 r268710 48 48 49 49 JSC_DECLARE_CUSTOM_GETTER(jsTestIndexedSetterNoIdentifierConstructor); 50 JSC_DECLARE_CUSTOM_SETTER(setJSTestIndexedSetterNoIdentifierConstructor);51 50 52 51 class JSTestIndexedSetterNoIdentifierPrototype final : public JSC::JSNonFinalObject { … … 103 102 static const HashTableValue JSTestIndexedSetterNoIdentifierPrototypeTableValues[] = 104 103 { 105 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestIndexedSetterNoIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestIndexedSetterNoIdentifierConstructor) } },104 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestIndexedSetterNoIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 106 105 }; 107 106 … … 250 249 return throwVMTypeError(lexicalGlobalObject, throwScope); 251 250 return JSValue::encode(JSTestIndexedSetterNoIdentifier::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 252 }253 254 JSC_DEFINE_CUSTOM_SETTER(setJSTestIndexedSetterNoIdentifierConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))255 {256 VM& vm = JSC::getVM(lexicalGlobalObject);257 auto throwScope = DECLARE_THROW_SCOPE(vm);258 auto* prototype = jsDynamicCast<JSTestIndexedSetterNoIdentifierPrototype*>(vm, JSValue::decode(thisValue));259 if (UNLIKELY(!prototype)) {260 throwVMTypeError(lexicalGlobalObject, throwScope);261 return false;262 }263 // Shadowing a built-in constructor264 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));265 251 } 266 252 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp
r267891 r268710 48 48 49 49 JSC_DECLARE_CUSTOM_GETTER(jsTestIndexedSetterThrowingExceptionConstructor); 50 JSC_DECLARE_CUSTOM_SETTER(setJSTestIndexedSetterThrowingExceptionConstructor);51 50 52 51 class JSTestIndexedSetterThrowingExceptionPrototype final : public JSC::JSNonFinalObject { … … 103 102 static const HashTableValue JSTestIndexedSetterThrowingExceptionPrototypeTableValues[] = 104 103 { 105 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestIndexedSetterThrowingExceptionConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestIndexedSetterThrowingExceptionConstructor) } },104 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestIndexedSetterThrowingExceptionConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 106 105 }; 107 106 … … 250 249 return throwVMTypeError(lexicalGlobalObject, throwScope); 251 250 return JSValue::encode(JSTestIndexedSetterThrowingException::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 252 }253 254 JSC_DEFINE_CUSTOM_SETTER(setJSTestIndexedSetterThrowingExceptionConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))255 {256 VM& vm = JSC::getVM(lexicalGlobalObject);257 auto throwScope = DECLARE_THROW_SCOPE(vm);258 auto* prototype = jsDynamicCast<JSTestIndexedSetterThrowingExceptionPrototype*>(vm, JSValue::decode(thisValue));259 if (UNLIKELY(!prototype)) {260 throwVMTypeError(lexicalGlobalObject, throwScope);261 return false;262 }263 // Shadowing a built-in constructor264 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));265 251 } 266 252 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp
r268551 r268710 54 54 55 55 JSC_DECLARE_CUSTOM_GETTER(jsTestIndexedSetterWithIdentifierConstructor); 56 JSC_DECLARE_CUSTOM_SETTER(setJSTestIndexedSetterWithIdentifierConstructor);57 56 58 57 class JSTestIndexedSetterWithIdentifierPrototype final : public JSC::JSNonFinalObject { … … 109 108 static const HashTableValue JSTestIndexedSetterWithIdentifierPrototypeTableValues[] = 110 109 { 111 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestIndexedSetterWithIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestIndexedSetterWithIdentifierConstructor) } },110 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestIndexedSetterWithIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 112 111 { "indexedSetter", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestIndexedSetterWithIdentifierPrototypeFunction_indexedSetter), (intptr_t) (2) } }, 113 112 }; … … 262 261 return throwVMTypeError(lexicalGlobalObject, throwScope); 263 262 return JSValue::encode(JSTestIndexedSetterWithIdentifier::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 264 }265 266 JSC_DEFINE_CUSTOM_SETTER(setJSTestIndexedSetterWithIdentifierConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))267 {268 VM& vm = JSC::getVM(lexicalGlobalObject);269 auto throwScope = DECLARE_THROW_SCOPE(vm);270 auto* prototype = jsDynamicCast<JSTestIndexedSetterWithIdentifierPrototype*>(vm, JSValue::decode(thisValue));271 if (UNLIKELY(!prototype)) {272 throwVMTypeError(lexicalGlobalObject, throwScope);273 return false;274 }275 // Shadowing a built-in constructor276 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));277 263 } 278 264 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
r268551 r268710 117 117 118 118 JSC_DECLARE_CUSTOM_GETTER(jsTestInterfaceConstructor); 119 JSC_DECLARE_CUSTOM_SETTER(setJSTestInterfaceConstructor);120 119 #if ENABLE(Condition22) || ENABLE(Condition23) 121 120 JSC_DECLARE_CUSTOM_GETTER(jsTestInterface_mixinReadOnlyAttribute); … … 307 306 static const HashTableValue JSTestInterfacePrototypeTableValues[] = 308 307 { 309 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestInterfaceConstructor) } },308 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 310 309 #if ENABLE(Condition22) || ENABLE(Condition23) 311 310 { "mixinReadOnlyAttribute", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterface_mixinReadOnlyAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, … … 526 525 return throwVMTypeError(lexicalGlobalObject, throwScope); 527 526 return JSValue::encode(JSTestInterface::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 528 }529 530 JSC_DEFINE_CUSTOM_SETTER(setJSTestInterfaceConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))531 {532 VM& vm = JSC::getVM(lexicalGlobalObject);533 auto throwScope = DECLARE_THROW_SCOPE(vm);534 auto* prototype = jsDynamicCast<JSTestInterfacePrototype*>(vm, JSValue::decode(thisValue));535 if (UNLIKELY(!prototype)) {536 throwVMTypeError(lexicalGlobalObject, throwScope);537 return false;538 }539 // Shadowing a built-in constructor540 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));541 527 } 542 528 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp
r268551 r268710 48 48 49 49 JSC_DECLARE_CUSTOM_GETTER(jsTestInterfaceLeadingUnderscoreConstructor); 50 JSC_DECLARE_CUSTOM_SETTER(setJSTestInterfaceLeadingUnderscoreConstructor);51 50 JSC_DECLARE_CUSTOM_GETTER(jsTestInterfaceLeadingUnderscore_readonly); 52 51 … … 104 103 static const HashTableValue JSTestInterfaceLeadingUnderscorePrototypeTableValues[] = 105 104 { 106 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceLeadingUnderscoreConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestInterfaceLeadingUnderscoreConstructor) } },105 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceLeadingUnderscoreConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 107 106 { "readonly", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceLeadingUnderscore_readonly), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 108 107 }; … … 167 166 return throwVMTypeError(lexicalGlobalObject, throwScope); 168 167 return JSValue::encode(JSTestInterfaceLeadingUnderscore::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 169 }170 171 JSC_DEFINE_CUSTOM_SETTER(setJSTestInterfaceLeadingUnderscoreConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))172 {173 VM& vm = JSC::getVM(lexicalGlobalObject);174 auto throwScope = DECLARE_THROW_SCOPE(vm);175 auto* prototype = jsDynamicCast<JSTestInterfaceLeadingUnderscorePrototype*>(vm, JSValue::decode(thisValue));176 if (UNLIKELY(!prototype)) {177 throwVMTypeError(lexicalGlobalObject, throwScope);178 return false;179 }180 // Shadowing a built-in constructor181 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));182 168 } 183 169 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp
r268551 r268710 59 59 60 60 JSC_DECLARE_CUSTOM_GETTER(jsTestIterableConstructor); 61 JSC_DECLARE_CUSTOM_SETTER(setJSTestIterableConstructor);62 61 63 62 class JSTestIterablePrototype final : public JSC::JSNonFinalObject { … … 114 113 static const HashTableValue JSTestIterablePrototypeTableValues[] = 115 114 { 116 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestIterableConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestIterableConstructor) } },115 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestIterableConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 117 116 { "entries", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestIterablePrototypeFunction_entries), (intptr_t) (0) } }, 118 117 { "keys", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestIterablePrototypeFunction_keys), (intptr_t) (0) } }, … … 181 180 return throwVMTypeError(lexicalGlobalObject, throwScope); 182 181 return JSValue::encode(JSTestIterable::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 183 }184 185 JSC_DEFINE_CUSTOM_SETTER(setJSTestIterableConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))186 {187 VM& vm = JSC::getVM(lexicalGlobalObject);188 auto throwScope = DECLARE_THROW_SCOPE(vm);189 auto* prototype = jsDynamicCast<JSTestIterablePrototype*>(vm, JSValue::decode(thisValue));190 if (UNLIKELY(!prototype)) {191 throwVMTypeError(lexicalGlobalObject, throwScope);192 return false;193 }194 // Shadowing a built-in constructor195 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));196 182 } 197 183 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp
r268551 r268710 49 49 50 50 JSC_DECLARE_CUSTOM_GETTER(jsTestJSBuiltinConstructorConstructor); 51 JSC_DECLARE_CUSTOM_SETTER(setJSTestJSBuiltinConstructorConstructor);52 51 JSC_DECLARE_CUSTOM_GETTER(jsTestJSBuiltinConstructor_testAttributeCustom); 53 52 JSC_DECLARE_CUSTOM_GETTER(jsTestJSBuiltinConstructor_testAttributeRWCustom); … … 112 111 static const HashTableValue JSTestJSBuiltinConstructorPrototypeTableValues[] = 113 112 { 114 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestJSBuiltinConstructorConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestJSBuiltinConstructorConstructor) } },113 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestJSBuiltinConstructorConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 115 114 { "testAttribute", static_cast<unsigned>(JSC::PropertyAttribute::Accessor | JSC::PropertyAttribute::Builtin), NoIntrinsic, { (intptr_t)static_cast<BuiltinGenerator>(testJSBuiltinConstructorTestAttributeCodeGenerator), (intptr_t) (setTestJSBuiltinConstructorTestAttributeCodeGenerator) } }, 116 115 { "testAttributeCustom", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestJSBuiltinConstructor_testAttributeCustom), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, … … 180 179 return throwVMTypeError(lexicalGlobalObject, throwScope); 181 180 return JSValue::encode(JSTestJSBuiltinConstructor::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 182 }183 184 JSC_DEFINE_CUSTOM_SETTER(setJSTestJSBuiltinConstructorConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))185 {186 VM& vm = JSC::getVM(lexicalGlobalObject);187 auto throwScope = DECLARE_THROW_SCOPE(vm);188 auto* prototype = jsDynamicCast<JSTestJSBuiltinConstructorPrototype*>(vm, JSValue::decode(thisValue));189 if (UNLIKELY(!prototype)) {190 throwVMTypeError(lexicalGlobalObject, throwScope);191 return false;192 }193 // Shadowing a built-in constructor194 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));195 181 } 196 182 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestLegacyFactoryFunction.cpp
r267891 r268710 50 50 51 51 JSC_DECLARE_CUSTOM_GETTER(jsTestLegacyFactoryFunctionConstructor); 52 JSC_DECLARE_CUSTOM_SETTER(setJSTestLegacyFactoryFunctionConstructor);53 52 54 53 class JSTestLegacyFactoryFunctionPrototype final : public JSC::JSNonFinalObject { … … 154 153 static const HashTableValue JSTestLegacyFactoryFunctionPrototypeTableValues[] = 155 154 { 156 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestLegacyFactoryFunctionConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestLegacyFactoryFunctionConstructor) } },155 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestLegacyFactoryFunctionConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 157 156 }; 158 157 … … 216 215 return throwVMTypeError(lexicalGlobalObject, throwScope); 217 216 return JSValue::encode(JSTestLegacyFactoryFunction::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 218 }219 220 JSC_DEFINE_CUSTOM_SETTER(setJSTestLegacyFactoryFunctionConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))221 {222 VM& vm = JSC::getVM(lexicalGlobalObject);223 auto throwScope = DECLARE_THROW_SCOPE(vm);224 auto* prototype = jsDynamicCast<JSTestLegacyFactoryFunctionPrototype*>(vm, JSValue::decode(thisValue));225 if (UNLIKELY(!prototype)) {226 throwVMTypeError(lexicalGlobalObject, throwScope);227 return false;228 }229 // Shadowing a built-in constructor230 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));231 217 } 232 218 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestLegacyOverrideBuiltIns.cpp
r268551 r268710 56 56 57 57 JSC_DECLARE_CUSTOM_GETTER(jsTestLegacyOverrideBuiltInsConstructor); 58 JSC_DECLARE_CUSTOM_SETTER(setJSTestLegacyOverrideBuiltInsConstructor);59 58 60 59 class JSTestLegacyOverrideBuiltInsPrototype final : public JSC::JSNonFinalObject { … … 111 110 static const HashTableValue JSTestLegacyOverrideBuiltInsPrototypeTableValues[] = 112 111 { 113 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestLegacyOverrideBuiltInsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestLegacyOverrideBuiltInsConstructor) } },112 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestLegacyOverrideBuiltInsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 114 113 { "namedItem", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestLegacyOverrideBuiltInsPrototypeFunction_namedItem), (intptr_t) (1) } }, 115 114 }; … … 224 223 return throwVMTypeError(lexicalGlobalObject, throwScope); 225 224 return JSValue::encode(JSTestLegacyOverrideBuiltIns::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 226 }227 228 JSC_DEFINE_CUSTOM_SETTER(setJSTestLegacyOverrideBuiltInsConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))229 {230 VM& vm = JSC::getVM(lexicalGlobalObject);231 auto throwScope = DECLARE_THROW_SCOPE(vm);232 auto* prototype = jsDynamicCast<JSTestLegacyOverrideBuiltInsPrototype*>(vm, JSValue::decode(thisValue));233 if (UNLIKELY(!prototype)) {234 throwVMTypeError(lexicalGlobalObject, throwScope);235 return false;236 }237 // Shadowing a built-in constructor238 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));239 225 } 240 226 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMapLike.cpp
r268551 r268710 64 64 65 65 JSC_DECLARE_CUSTOM_GETTER(jsTestMapLikeConstructor); 66 JSC_DECLARE_CUSTOM_SETTER(setJSTestMapLikeConstructor);67 66 JSC_DECLARE_CUSTOM_GETTER(jsTestMapLike_size); 68 67 … … 120 119 static const HashTableValue JSTestMapLikePrototypeTableValues[] = 121 120 { 122 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestMapLikeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestMapLikeConstructor) } },121 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestMapLikeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 123 122 { "size", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestMapLike_size), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 124 123 { "get", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestMapLikePrototypeFunction_get), (intptr_t) (1) } }, … … 198 197 return throwVMTypeError(lexicalGlobalObject, throwScope); 199 198 return JSValue::encode(JSTestMapLike::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 200 }201 202 JSC_DEFINE_CUSTOM_SETTER(setJSTestMapLikeConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))203 {204 VM& vm = JSC::getVM(lexicalGlobalObject);205 auto throwScope = DECLARE_THROW_SCOPE(vm);206 auto* prototype = jsDynamicCast<JSTestMapLikePrototype*>(vm, JSValue::decode(thisValue));207 if (UNLIKELY(!prototype)) {208 throwVMTypeError(lexicalGlobalObject, throwScope);209 return false;210 }211 // Shadowing a built-in constructor212 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));213 199 } 214 200 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMapLikeWithOverriddenOperations.cpp
r268551 r268710 64 64 65 65 JSC_DECLARE_CUSTOM_GETTER(jsTestMapLikeWithOverriddenOperationsConstructor); 66 JSC_DECLARE_CUSTOM_SETTER(setJSTestMapLikeWithOverriddenOperationsConstructor);67 66 JSC_DECLARE_CUSTOM_GETTER(jsTestMapLikeWithOverriddenOperations_set); 68 67 JSC_DECLARE_CUSTOM_SETTER(setJSTestMapLikeWithOverriddenOperations_set); … … 122 121 static const HashTableValue JSTestMapLikeWithOverriddenOperationsPrototypeTableValues[] = 123 122 { 124 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestMapLikeWithOverriddenOperationsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestMapLikeWithOverriddenOperationsConstructor) } },123 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestMapLikeWithOverriddenOperationsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 125 124 { "set", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestMapLikeWithOverriddenOperations_set), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestMapLikeWithOverriddenOperations_set) } }, 126 125 { "size", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestMapLikeWithOverriddenOperations_size), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, … … 200 199 return throwVMTypeError(lexicalGlobalObject, throwScope); 201 200 return JSValue::encode(JSTestMapLikeWithOverriddenOperations::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 202 }203 204 JSC_DEFINE_CUSTOM_SETTER(setJSTestMapLikeWithOverriddenOperationsConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))205 {206 VM& vm = JSC::getVM(lexicalGlobalObject);207 auto throwScope = DECLARE_THROW_SCOPE(vm);208 auto* prototype = jsDynamicCast<JSTestMapLikeWithOverriddenOperationsPrototype*>(vm, JSValue::decode(thisValue));209 if (UNLIKELY(!prototype)) {210 throwVMTypeError(lexicalGlobalObject, throwScope);211 return false;212 }213 // Shadowing a built-in constructor214 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));215 201 } 216 202 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp
r267891 r268710 49 49 50 50 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedAndIndexedSetterNoIdentifierConstructor); 51 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedAndIndexedSetterNoIdentifierConstructor);52 51 53 52 class JSTestNamedAndIndexedSetterNoIdentifierPrototype final : public JSC::JSNonFinalObject { … … 104 103 static const HashTableValue JSTestNamedAndIndexedSetterNoIdentifierPrototypeTableValues[] = 105 104 { 106 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedAndIndexedSetterNoIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedAndIndexedSetterNoIdentifierConstructor) } },105 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedAndIndexedSetterNoIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 107 106 }; 108 107 … … 324 323 return throwVMTypeError(lexicalGlobalObject, throwScope); 325 324 return JSValue::encode(JSTestNamedAndIndexedSetterNoIdentifier::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 326 }327 328 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedAndIndexedSetterNoIdentifierConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))329 {330 VM& vm = JSC::getVM(lexicalGlobalObject);331 auto throwScope = DECLARE_THROW_SCOPE(vm);332 auto* prototype = jsDynamicCast<JSTestNamedAndIndexedSetterNoIdentifierPrototype*>(vm, JSValue::decode(thisValue));333 if (UNLIKELY(!prototype)) {334 throwVMTypeError(lexicalGlobalObject, throwScope);335 return false;336 }337 // Shadowing a built-in constructor338 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));339 325 } 340 326 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp
r267891 r268710 49 49 50 50 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedAndIndexedSetterThrowingExceptionConstructor); 51 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedAndIndexedSetterThrowingExceptionConstructor);52 51 53 52 class JSTestNamedAndIndexedSetterThrowingExceptionPrototype final : public JSC::JSNonFinalObject { … … 104 103 static const HashTableValue JSTestNamedAndIndexedSetterThrowingExceptionPrototypeTableValues[] = 105 104 { 106 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedAndIndexedSetterThrowingExceptionConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedAndIndexedSetterThrowingExceptionConstructor) } },105 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedAndIndexedSetterThrowingExceptionConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 107 106 }; 108 107 … … 324 323 return throwVMTypeError(lexicalGlobalObject, throwScope); 325 324 return JSValue::encode(JSTestNamedAndIndexedSetterThrowingException::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 326 }327 328 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedAndIndexedSetterThrowingExceptionConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))329 {330 VM& vm = JSC::getVM(lexicalGlobalObject);331 auto throwScope = DECLARE_THROW_SCOPE(vm);332 auto* prototype = jsDynamicCast<JSTestNamedAndIndexedSetterThrowingExceptionPrototype*>(vm, JSValue::decode(thisValue));333 if (UNLIKELY(!prototype)) {334 throwVMTypeError(lexicalGlobalObject, throwScope);335 return false;336 }337 // Shadowing a built-in constructor338 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));339 325 } 340 326 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp
r268551 r268710 56 56 57 57 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedAndIndexedSetterWithIdentifierConstructor); 58 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedAndIndexedSetterWithIdentifierConstructor);59 58 60 59 class JSTestNamedAndIndexedSetterWithIdentifierPrototype final : public JSC::JSNonFinalObject { … … 111 110 static const HashTableValue JSTestNamedAndIndexedSetterWithIdentifierPrototypeTableValues[] = 112 111 { 113 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedAndIndexedSetterWithIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedAndIndexedSetterWithIdentifierConstructor) } },112 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedAndIndexedSetterWithIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 114 113 { "namedSetter", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunction_namedSetter), (intptr_t) (2) } }, 115 114 { "indexedSetter", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestNamedAndIndexedSetterWithIdentifierPrototypeFunction_indexedSetter), (intptr_t) (2) } }, … … 338 337 return throwVMTypeError(lexicalGlobalObject, throwScope); 339 338 return JSValue::encode(JSTestNamedAndIndexedSetterWithIdentifier::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 340 }341 342 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedAndIndexedSetterWithIdentifierConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))343 {344 VM& vm = JSC::getVM(lexicalGlobalObject);345 auto throwScope = DECLARE_THROW_SCOPE(vm);346 auto* prototype = jsDynamicCast<JSTestNamedAndIndexedSetterWithIdentifierPrototype*>(vm, JSValue::decode(thisValue));347 if (UNLIKELY(!prototype)) {348 throwVMTypeError(lexicalGlobalObject, throwScope);349 return false;350 }351 // Shadowing a built-in constructor352 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));353 339 } 354 340 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp
r267891 r268710 48 48 49 49 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedDeleterNoIdentifierConstructor); 50 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedDeleterNoIdentifierConstructor);51 50 52 51 class JSTestNamedDeleterNoIdentifierPrototype final : public JSC::JSNonFinalObject { … … 103 102 static const HashTableValue JSTestNamedDeleterNoIdentifierPrototypeTableValues[] = 104 103 { 105 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedDeleterNoIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedDeleterNoIdentifierConstructor) } },104 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedDeleterNoIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 106 105 }; 107 106 … … 236 235 return throwVMTypeError(lexicalGlobalObject, throwScope); 237 236 return JSValue::encode(JSTestNamedDeleterNoIdentifier::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 238 }239 240 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedDeleterNoIdentifierConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))241 {242 VM& vm = JSC::getVM(lexicalGlobalObject);243 auto throwScope = DECLARE_THROW_SCOPE(vm);244 auto* prototype = jsDynamicCast<JSTestNamedDeleterNoIdentifierPrototype*>(vm, JSValue::decode(thisValue));245 if (UNLIKELY(!prototype)) {246 throwVMTypeError(lexicalGlobalObject, throwScope);247 return false;248 }249 // Shadowing a built-in constructor250 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));251 237 } 252 238 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp
r267891 r268710 48 48 49 49 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedDeleterThrowingExceptionConstructor); 50 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedDeleterThrowingExceptionConstructor);51 50 52 51 class JSTestNamedDeleterThrowingExceptionPrototype final : public JSC::JSNonFinalObject { … … 103 102 static const HashTableValue JSTestNamedDeleterThrowingExceptionPrototypeTableValues[] = 104 103 { 105 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedDeleterThrowingExceptionConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedDeleterThrowingExceptionConstructor) } },104 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedDeleterThrowingExceptionConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 106 105 }; 107 106 … … 236 235 return throwVMTypeError(lexicalGlobalObject, throwScope); 237 236 return JSValue::encode(JSTestNamedDeleterThrowingException::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 238 }239 240 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedDeleterThrowingExceptionConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))241 {242 VM& vm = JSC::getVM(lexicalGlobalObject);243 auto throwScope = DECLARE_THROW_SCOPE(vm);244 auto* prototype = jsDynamicCast<JSTestNamedDeleterThrowingExceptionPrototype*>(vm, JSValue::decode(thisValue));245 if (UNLIKELY(!prototype)) {246 throwVMTypeError(lexicalGlobalObject, throwScope);247 return false;248 }249 // Shadowing a built-in constructor250 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));251 237 } 252 238 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp
r268551 r268710 53 53 54 54 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedDeleterWithIdentifierConstructor); 55 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedDeleterWithIdentifierConstructor);56 55 57 56 class JSTestNamedDeleterWithIdentifierPrototype final : public JSC::JSNonFinalObject { … … 108 107 static const HashTableValue JSTestNamedDeleterWithIdentifierPrototypeTableValues[] = 109 108 { 110 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedDeleterWithIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedDeleterWithIdentifierConstructor) } },109 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedDeleterWithIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 111 110 { "namedDeleter", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestNamedDeleterWithIdentifierPrototypeFunction_namedDeleter), (intptr_t) (1) } }, 112 111 }; … … 243 242 return throwVMTypeError(lexicalGlobalObject, throwScope); 244 243 return JSValue::encode(JSTestNamedDeleterWithIdentifier::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 245 }246 247 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedDeleterWithIdentifierConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))248 {249 VM& vm = JSC::getVM(lexicalGlobalObject);250 auto throwScope = DECLARE_THROW_SCOPE(vm);251 auto* prototype = jsDynamicCast<JSTestNamedDeleterWithIdentifierPrototype*>(vm, JSValue::decode(thisValue));252 if (UNLIKELY(!prototype)) {253 throwVMTypeError(lexicalGlobalObject, throwScope);254 return false;255 }256 // Shadowing a built-in constructor257 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));258 244 } 259 245 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp
r267891 r268710 49 49 50 50 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedDeleterWithIndexedGetterConstructor); 51 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedDeleterWithIndexedGetterConstructor);52 51 53 52 class JSTestNamedDeleterWithIndexedGetterPrototype final : public JSC::JSNonFinalObject { … … 104 103 static const HashTableValue JSTestNamedDeleterWithIndexedGetterPrototypeTableValues[] = 105 104 { 106 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedDeleterWithIndexedGetterConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedDeleterWithIndexedGetterConstructor) } },105 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedDeleterWithIndexedGetterConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 107 106 }; 108 107 … … 250 249 return throwVMTypeError(lexicalGlobalObject, throwScope); 251 250 return JSValue::encode(JSTestNamedDeleterWithIndexedGetter::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 252 }253 254 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedDeleterWithIndexedGetterConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))255 {256 VM& vm = JSC::getVM(lexicalGlobalObject);257 auto throwScope = DECLARE_THROW_SCOPE(vm);258 auto* prototype = jsDynamicCast<JSTestNamedDeleterWithIndexedGetterPrototype*>(vm, JSValue::decode(thisValue));259 if (UNLIKELY(!prototype)) {260 throwVMTypeError(lexicalGlobalObject, throwScope);261 return false;262 }263 // Shadowing a built-in constructor264 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));265 251 } 266 252 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp
r267891 r268710 48 48 49 49 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedGetterCallWithConstructor); 50 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedGetterCallWithConstructor);51 50 52 51 class JSTestNamedGetterCallWithPrototype final : public JSC::JSNonFinalObject { … … 103 102 static const HashTableValue JSTestNamedGetterCallWithPrototypeTableValues[] = 104 103 { 105 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedGetterCallWithConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedGetterCallWithConstructor) } },104 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedGetterCallWithConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 106 105 }; 107 106 … … 210 209 return throwVMTypeError(lexicalGlobalObject, throwScope); 211 210 return JSValue::encode(JSTestNamedGetterCallWith::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 212 }213 214 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedGetterCallWithConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))215 {216 VM& vm = JSC::getVM(lexicalGlobalObject);217 auto throwScope = DECLARE_THROW_SCOPE(vm);218 auto* prototype = jsDynamicCast<JSTestNamedGetterCallWithPrototype*>(vm, JSValue::decode(thisValue));219 if (UNLIKELY(!prototype)) {220 throwVMTypeError(lexicalGlobalObject, throwScope);221 return false;222 }223 // Shadowing a built-in constructor224 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));225 211 } 226 212 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp
r267891 r268710 48 48 49 49 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedGetterNoIdentifierConstructor); 50 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedGetterNoIdentifierConstructor);51 50 52 51 class JSTestNamedGetterNoIdentifierPrototype final : public JSC::JSNonFinalObject { … … 103 102 static const HashTableValue JSTestNamedGetterNoIdentifierPrototypeTableValues[] = 104 103 { 105 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedGetterNoIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedGetterNoIdentifierConstructor) } },104 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedGetterNoIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 106 105 }; 107 106 … … 210 209 return throwVMTypeError(lexicalGlobalObject, throwScope); 211 210 return JSValue::encode(JSTestNamedGetterNoIdentifier::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 212 }213 214 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedGetterNoIdentifierConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))215 {216 VM& vm = JSC::getVM(lexicalGlobalObject);217 auto throwScope = DECLARE_THROW_SCOPE(vm);218 auto* prototype = jsDynamicCast<JSTestNamedGetterNoIdentifierPrototype*>(vm, JSValue::decode(thisValue));219 if (UNLIKELY(!prototype)) {220 throwVMTypeError(lexicalGlobalObject, throwScope);221 return false;222 }223 // Shadowing a built-in constructor224 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));225 211 } 226 212 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp
r268551 r268710 53 53 54 54 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedGetterWithIdentifierConstructor); 55 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedGetterWithIdentifierConstructor);56 55 57 56 class JSTestNamedGetterWithIdentifierPrototype final : public JSC::JSNonFinalObject { … … 108 107 static const HashTableValue JSTestNamedGetterWithIdentifierPrototypeTableValues[] = 109 108 { 110 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedGetterWithIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedGetterWithIdentifierConstructor) } },109 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedGetterWithIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 111 110 { "getterName", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestNamedGetterWithIdentifierPrototypeFunction_getterName), (intptr_t) (1) } }, 112 111 }; … … 221 220 return throwVMTypeError(lexicalGlobalObject, throwScope); 222 221 return JSValue::encode(JSTestNamedGetterWithIdentifier::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 223 }224 225 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedGetterWithIdentifierConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))226 {227 VM& vm = JSC::getVM(lexicalGlobalObject);228 auto throwScope = DECLARE_THROW_SCOPE(vm);229 auto* prototype = jsDynamicCast<JSTestNamedGetterWithIdentifierPrototype*>(vm, JSValue::decode(thisValue));230 if (UNLIKELY(!prototype)) {231 throwVMTypeError(lexicalGlobalObject, throwScope);232 return false;233 }234 // Shadowing a built-in constructor235 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));236 222 } 237 223 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp
r267891 r268710 48 48 49 49 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedSetterNoIdentifierConstructor); 50 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedSetterNoIdentifierConstructor);51 50 52 51 class JSTestNamedSetterNoIdentifierPrototype final : public JSC::JSNonFinalObject { … … 103 102 static const HashTableValue JSTestNamedSetterNoIdentifierPrototypeTableValues[] = 104 103 { 105 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterNoIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedSetterNoIdentifierConstructor) } },104 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterNoIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 106 105 }; 107 106 … … 279 278 return throwVMTypeError(lexicalGlobalObject, throwScope); 280 279 return JSValue::encode(JSTestNamedSetterNoIdentifier::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 281 }282 283 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedSetterNoIdentifierConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))284 {285 VM& vm = JSC::getVM(lexicalGlobalObject);286 auto throwScope = DECLARE_THROW_SCOPE(vm);287 auto* prototype = jsDynamicCast<JSTestNamedSetterNoIdentifierPrototype*>(vm, JSValue::decode(thisValue));288 if (UNLIKELY(!prototype)) {289 throwVMTypeError(lexicalGlobalObject, throwScope);290 return false;291 }292 // Shadowing a built-in constructor293 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));294 280 } 295 281 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp
r267891 r268710 48 48 49 49 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedSetterThrowingExceptionConstructor); 50 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedSetterThrowingExceptionConstructor);51 50 52 51 class JSTestNamedSetterThrowingExceptionPrototype final : public JSC::JSNonFinalObject { … … 103 102 static const HashTableValue JSTestNamedSetterThrowingExceptionPrototypeTableValues[] = 104 103 { 105 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterThrowingExceptionConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedSetterThrowingExceptionConstructor) } },104 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterThrowingExceptionConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 106 105 }; 107 106 … … 279 278 return throwVMTypeError(lexicalGlobalObject, throwScope); 280 279 return JSValue::encode(JSTestNamedSetterThrowingException::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 281 }282 283 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedSetterThrowingExceptionConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))284 {285 VM& vm = JSC::getVM(lexicalGlobalObject);286 auto throwScope = DECLARE_THROW_SCOPE(vm);287 auto* prototype = jsDynamicCast<JSTestNamedSetterThrowingExceptionPrototype*>(vm, JSValue::decode(thisValue));288 if (UNLIKELY(!prototype)) {289 throwVMTypeError(lexicalGlobalObject, throwScope);290 return false;291 }292 // Shadowing a built-in constructor293 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));294 280 } 295 281 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp
r268551 r268710 53 53 54 54 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedSetterWithIdentifierConstructor); 55 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedSetterWithIdentifierConstructor);56 55 57 56 class JSTestNamedSetterWithIdentifierPrototype final : public JSC::JSNonFinalObject { … … 108 107 static const HashTableValue JSTestNamedSetterWithIdentifierPrototypeTableValues[] = 109 108 { 110 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterWithIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedSetterWithIdentifierConstructor) } },109 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterWithIdentifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 111 110 { "namedSetter", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestNamedSetterWithIdentifierPrototypeFunction_namedSetter), (intptr_t) (2) } }, 112 111 }; … … 290 289 return throwVMTypeError(lexicalGlobalObject, throwScope); 291 290 return JSValue::encode(JSTestNamedSetterWithIdentifier::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 292 }293 294 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedSetterWithIdentifierConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))295 {296 VM& vm = JSC::getVM(lexicalGlobalObject);297 auto throwScope = DECLARE_THROW_SCOPE(vm);298 auto* prototype = jsDynamicCast<JSTestNamedSetterWithIdentifierPrototype*>(vm, JSValue::decode(thisValue));299 if (UNLIKELY(!prototype)) {300 throwVMTypeError(lexicalGlobalObject, throwScope);301 return false;302 }303 // Shadowing a built-in constructor304 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));305 291 } 306 292 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp
r268551 r268710 56 56 57 57 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedSetterWithIndexedGetterConstructor); 58 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedSetterWithIndexedGetterConstructor);59 58 60 59 class JSTestNamedSetterWithIndexedGetterPrototype final : public JSC::JSNonFinalObject { … … 111 110 static const HashTableValue JSTestNamedSetterWithIndexedGetterPrototypeTableValues[] = 112 111 { 113 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterWithIndexedGetterConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedSetterWithIndexedGetterConstructor) } },112 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterWithIndexedGetterConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 114 113 { "namedSetter", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestNamedSetterWithIndexedGetterPrototypeFunction_namedSetter), (intptr_t) (2) } }, 115 114 { "indexedSetter", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestNamedSetterWithIndexedGetterPrototypeFunction_indexedSetter), (intptr_t) (1) } }, … … 315 314 return throwVMTypeError(lexicalGlobalObject, throwScope); 316 315 return JSValue::encode(JSTestNamedSetterWithIndexedGetter::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 317 }318 319 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedSetterWithIndexedGetterConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))320 {321 VM& vm = JSC::getVM(lexicalGlobalObject);322 auto throwScope = DECLARE_THROW_SCOPE(vm);323 auto* prototype = jsDynamicCast<JSTestNamedSetterWithIndexedGetterPrototype*>(vm, JSValue::decode(thisValue));324 if (UNLIKELY(!prototype)) {325 throwVMTypeError(lexicalGlobalObject, throwScope);326 return false;327 }328 // Shadowing a built-in constructor329 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));330 316 } 331 317 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp
r268551 r268710 56 56 57 57 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedSetterWithIndexedGetterAndSetterConstructor); 58 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedSetterWithIndexedGetterAndSetterConstructor);59 58 60 59 class JSTestNamedSetterWithIndexedGetterAndSetterPrototype final : public JSC::JSNonFinalObject { … … 111 110 static const HashTableValue JSTestNamedSetterWithIndexedGetterAndSetterPrototypeTableValues[] = 112 111 { 113 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterWithIndexedGetterAndSetterConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedSetterWithIndexedGetterAndSetterConstructor) } },112 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterWithIndexedGetterAndSetterConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 114 113 { "namedSetter", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunction_namedSetter), (intptr_t) (2) } }, 115 114 { "indexedSetter", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestNamedSetterWithIndexedGetterAndSetterPrototypeFunction_indexedSetter), (intptr_t) (1) } }, … … 338 337 return throwVMTypeError(lexicalGlobalObject, throwScope); 339 338 return JSValue::encode(JSTestNamedSetterWithIndexedGetterAndSetter::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 340 }341 342 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedSetterWithIndexedGetterAndSetterConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))343 {344 VM& vm = JSC::getVM(lexicalGlobalObject);345 auto throwScope = DECLARE_THROW_SCOPE(vm);346 auto* prototype = jsDynamicCast<JSTestNamedSetterWithIndexedGetterAndSetterPrototype*>(vm, JSValue::decode(thisValue));347 if (UNLIKELY(!prototype)) {348 throwVMTypeError(lexicalGlobalObject, throwScope);349 return false;350 }351 // Shadowing a built-in constructor352 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));353 339 } 354 340 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.cpp
r267891 r268710 48 48 49 49 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedSetterWithLegacyOverrideBuiltInsConstructor); 50 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedSetterWithLegacyOverrideBuiltInsConstructor);51 50 52 51 class JSTestNamedSetterWithLegacyOverrideBuiltInsPrototype final : public JSC::JSNonFinalObject { … … 103 102 static const HashTableValue JSTestNamedSetterWithLegacyOverrideBuiltInsPrototypeTableValues[] = 104 103 { 105 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterWithLegacyOverrideBuiltInsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedSetterWithLegacyOverrideBuiltInsConstructor) } },104 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterWithLegacyOverrideBuiltInsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 106 105 }; 107 106 … … 260 259 return throwVMTypeError(lexicalGlobalObject, throwScope); 261 260 return JSValue::encode(JSTestNamedSetterWithLegacyOverrideBuiltIns::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 262 }263 264 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedSetterWithLegacyOverrideBuiltInsConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))265 {266 VM& vm = JSC::getVM(lexicalGlobalObject);267 auto throwScope = DECLARE_THROW_SCOPE(vm);268 auto* prototype = jsDynamicCast<JSTestNamedSetterWithLegacyOverrideBuiltInsPrototype*>(vm, JSValue::decode(thisValue));269 if (UNLIKELY(!prototype)) {270 throwVMTypeError(lexicalGlobalObject, throwScope);271 return false;272 }273 // Shadowing a built-in constructor274 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));275 261 } 276 262 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.cpp
r268551 r268710 54 54 55 55 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedSetterWithLegacyUnforgeablePropertiesConstructor); 56 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedSetterWithLegacyUnforgeablePropertiesConstructor);57 56 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedSetterWithLegacyUnforgeableProperties_unforgeableAttribute); 58 57 … … 127 126 static const HashTableValue JSTestNamedSetterWithLegacyUnforgeablePropertiesPrototypeTableValues[] = 128 127 { 129 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterWithLegacyUnforgeablePropertiesConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedSetterWithLegacyUnforgeablePropertiesConstructor) } },128 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterWithLegacyUnforgeablePropertiesConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 130 129 }; 131 130 … … 320 319 return throwVMTypeError(lexicalGlobalObject, throwScope); 321 320 return JSValue::encode(JSTestNamedSetterWithLegacyUnforgeableProperties::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 322 }323 324 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedSetterWithLegacyUnforgeablePropertiesConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))325 {326 VM& vm = JSC::getVM(lexicalGlobalObject);327 auto throwScope = DECLARE_THROW_SCOPE(vm);328 auto* prototype = jsDynamicCast<JSTestNamedSetterWithLegacyUnforgeablePropertiesPrototype*>(vm, JSValue::decode(thisValue));329 if (UNLIKELY(!prototype)) {330 throwVMTypeError(lexicalGlobalObject, throwScope);331 return false;332 }333 // Shadowing a built-in constructor334 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));335 321 } 336 322 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.cpp
r268551 r268710 54 54 55 55 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltInsConstructor); 56 JSC_DECLARE_CUSTOM_SETTER(setJSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltInsConstructor);57 56 JSC_DECLARE_CUSTOM_GETTER(jsTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns_unforgeableAttribute); 58 57 … … 127 126 static const HashTableValue JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltInsPrototypeTableValues[] = 128 127 { 129 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltInsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltInsConstructor) } },128 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltInsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 130 129 }; 131 130 … … 301 300 return throwVMTypeError(lexicalGlobalObject, throwScope); 302 301 return JSValue::encode(JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 303 }304 305 JSC_DEFINE_CUSTOM_SETTER(setJSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltInsConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))306 {307 VM& vm = JSC::getVM(lexicalGlobalObject);308 auto throwScope = DECLARE_THROW_SCOPE(vm);309 auto* prototype = jsDynamicCast<JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltInsPrototype*>(vm, JSValue::decode(thisValue));310 if (UNLIKELY(!prototype)) {311 throwVMTypeError(lexicalGlobalObject, throwScope);312 return false;313 }314 // Shadowing a built-in constructor315 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));316 302 } 317 303 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp
r268551 r268710 71 71 72 72 JSC_DECLARE_CUSTOM_GETTER(jsTestNodeConstructor); 73 JSC_DECLARE_CUSTOM_SETTER(setJSTestNodeConstructor);74 73 JSC_DECLARE_CUSTOM_GETTER(jsTestNode_name); 75 74 JSC_DECLARE_CUSTOM_SETTER(setJSTestNode_name); … … 144 143 static const HashTableValue JSTestNodePrototypeTableValues[] = 145 144 { 146 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNodeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestNodeConstructor) } },145 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNodeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 147 146 { "name", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestNode_name), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestNode_name) } }, 148 147 { "testWorkerPromise", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestNodePrototypeFunction_testWorkerPromise), (intptr_t) (0) } }, … … 274 273 return throwVMTypeError(lexicalGlobalObject, throwScope); 275 274 return JSValue::encode(JSTestNode::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 276 }277 278 JSC_DEFINE_CUSTOM_SETTER(setJSTestNodeConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))279 {280 VM& vm = JSC::getVM(lexicalGlobalObject);281 auto throwScope = DECLARE_THROW_SCOPE(vm);282 auto* prototype = jsDynamicCast<JSTestNodePrototype*>(vm, JSValue::decode(thisValue));283 if (UNLIKELY(!prototype)) {284 throwVMTypeError(lexicalGlobalObject, throwScope);285 return false;286 }287 // Shadowing a built-in constructor288 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));289 275 } 290 276 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r268551 r268710 1608 1608 1609 1609 JSC_DECLARE_CUSTOM_GETTER(jsTestObjConstructor); 1610 JSC_DECLARE_CUSTOM_SETTER(setJSTestObjConstructor);1611 1610 JSC_DECLARE_CUSTOM_GETTER(jsTestObj_readOnlyLongAttr); 1612 1611 JSC_DECLARE_CUSTOM_GETTER(jsTestObj_readOnlyStringAttr); … … 2024 2023 static const HashTableValue JSTestObjPrototypeTableValues[] = 2025 2024 { 2026 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestObjConstructor) } },2025 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 2027 2026 { "readOnlyLongAttr", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObj_readOnlyLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 2028 2027 { "readOnlyStringAttr", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObj_readOnlyStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, … … 2629 2628 } 2630 2629 2631 JSC_DEFINE_CUSTOM_SETTER(setJSTestObjConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))2632 {2633 VM& vm = JSC::getVM(lexicalGlobalObject);2634 auto throwScope = DECLARE_THROW_SCOPE(vm);2635 auto* prototype = jsDynamicCast<JSTestObjPrototype*>(vm, JSValue::decode(thisValue));2636 if (UNLIKELY(!prototype)) {2637 throwVMTypeError(lexicalGlobalObject, throwScope);2638 return false;2639 }2640 // Shadowing a built-in constructor2641 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));2642 }2643 2644 2630 static inline JSValue jsTestObj_readOnlyLongAttrGetter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject) 2645 2631 { -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOperationConditional.cpp
r268551 r268710 59 59 60 60 JSC_DECLARE_CUSTOM_GETTER(jsTestOperationConditionalConstructor); 61 JSC_DECLARE_CUSTOM_SETTER(setJSTestOperationConditionalConstructor);62 61 63 62 class JSTestOperationConditionalPrototype final : public JSC::JSNonFinalObject { … … 114 113 static const HashTableValue JSTestOperationConditionalPrototypeTableValues[] = 115 114 { 116 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestOperationConditionalConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestOperationConditionalConstructor) } },115 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestOperationConditionalConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 117 116 #if ENABLE(ConditionBase) 118 117 { "nonConditionalOperation", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestOperationConditionalPrototypeFunction_nonConditionalOperation), (intptr_t) (0) } }, … … 186 185 return throwVMTypeError(lexicalGlobalObject, throwScope); 187 186 return JSValue::encode(JSTestOperationConditional::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 188 }189 190 JSC_DEFINE_CUSTOM_SETTER(setJSTestOperationConditionalConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))191 {192 VM& vm = JSC::getVM(lexicalGlobalObject);193 auto throwScope = DECLARE_THROW_SCOPE(vm);194 auto* prototype = jsDynamicCast<JSTestOperationConditionalPrototype*>(vm, JSValue::decode(thisValue));195 if (UNLIKELY(!prototype)) {196 throwVMTypeError(lexicalGlobalObject, throwScope);197 return false;198 }199 // Shadowing a built-in constructor200 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));201 187 } 202 188 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
r267938 r268710 52 52 53 53 JSC_DECLARE_CUSTOM_GETTER(jsTestOverloadedConstructorsConstructor); 54 JSC_DECLARE_CUSTOM_SETTER(setJSTestOverloadedConstructorsConstructor);55 54 56 55 class JSTestOverloadedConstructorsPrototype final : public JSC::JSNonFinalObject { … … 226 225 static const HashTableValue JSTestOverloadedConstructorsPrototypeTableValues[] = 227 226 { 228 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestOverloadedConstructorsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestOverloadedConstructorsConstructor) } },227 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestOverloadedConstructorsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 229 228 }; 230 229 … … 283 282 return throwVMTypeError(lexicalGlobalObject, throwScope); 284 283 return JSValue::encode(JSTestOverloadedConstructors::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 285 }286 287 JSC_DEFINE_CUSTOM_SETTER(setJSTestOverloadedConstructorsConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))288 {289 VM& vm = JSC::getVM(lexicalGlobalObject);290 auto throwScope = DECLARE_THROW_SCOPE(vm);291 auto* prototype = jsDynamicCast<JSTestOverloadedConstructorsPrototype*>(vm, JSValue::decode(thisValue));292 if (UNLIKELY(!prototype)) {293 throwVMTypeError(lexicalGlobalObject, throwScope);294 return false;295 }296 // Shadowing a built-in constructor297 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));298 284 } 299 285 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp
r267938 r268710 51 51 52 52 JSC_DECLARE_CUSTOM_GETTER(jsTestOverloadedConstructorsWithSequenceConstructor); 53 JSC_DECLARE_CUSTOM_SETTER(setJSTestOverloadedConstructorsWithSequenceConstructor);54 53 55 54 class JSTestOverloadedConstructorsWithSequencePrototype final : public JSC::JSNonFinalObject { … … 165 164 static const HashTableValue JSTestOverloadedConstructorsWithSequencePrototypeTableValues[] = 166 165 { 167 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestOverloadedConstructorsWithSequenceConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestOverloadedConstructorsWithSequenceConstructor) } },166 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestOverloadedConstructorsWithSequenceConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 168 167 }; 169 168 … … 222 221 return throwVMTypeError(lexicalGlobalObject, throwScope); 223 222 return JSValue::encode(JSTestOverloadedConstructorsWithSequence::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 224 }225 226 JSC_DEFINE_CUSTOM_SETTER(setJSTestOverloadedConstructorsWithSequenceConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))227 {228 VM& vm = JSC::getVM(lexicalGlobalObject);229 auto throwScope = DECLARE_THROW_SCOPE(vm);230 auto* prototype = jsDynamicCast<JSTestOverloadedConstructorsWithSequencePrototype*>(vm, JSValue::decode(thisValue));231 if (UNLIKELY(!prototype)) {232 throwVMTypeError(lexicalGlobalObject, throwScope);233 return false;234 }235 // Shadowing a built-in constructor236 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));237 223 } 238 224 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestPluginInterface.cpp
r267891 r268710 47 47 48 48 JSC_DECLARE_CUSTOM_GETTER(jsTestPluginInterfaceConstructor); 49 JSC_DECLARE_CUSTOM_SETTER(setJSTestPluginInterfaceConstructor);50 49 51 50 class JSTestPluginInterfacePrototype final : public JSC::JSNonFinalObject { … … 102 101 static const HashTableValue JSTestPluginInterfacePrototypeTableValues[] = 103 102 { 104 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestPluginInterfaceConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestPluginInterfaceConstructor) } },103 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestPluginInterfaceConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 105 104 }; 106 105 … … 220 219 return throwVMTypeError(lexicalGlobalObject, throwScope); 221 220 return JSValue::encode(JSTestPluginInterface::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 222 }223 224 JSC_DEFINE_CUSTOM_SETTER(setJSTestPluginInterfaceConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))225 {226 VM& vm = JSC::getVM(lexicalGlobalObject);227 auto throwScope = DECLARE_THROW_SCOPE(vm);228 auto* prototype = jsDynamicCast<JSTestPluginInterfacePrototype*>(vm, JSValue::decode(thisValue));229 if (UNLIKELY(!prototype)) {230 throwVMTypeError(lexicalGlobalObject, throwScope);231 return false;232 }233 // Shadowing a built-in constructor234 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));235 221 } 236 222 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp
r268551 r268710 129 129 130 130 JSC_DECLARE_CUSTOM_GETTER(jsTestPromiseRejectionEventConstructor); 131 JSC_DECLARE_CUSTOM_SETTER(setJSTestPromiseRejectionEventConstructor);132 131 JSC_DECLARE_CUSTOM_GETTER(jsTestPromiseRejectionEvent_promise); 133 132 JSC_DECLARE_CUSTOM_GETTER(jsTestPromiseRejectionEvent_reason); … … 210 209 static const HashTableValue JSTestPromiseRejectionEventPrototypeTableValues[] = 211 210 { 212 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestPromiseRejectionEventConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestPromiseRejectionEventConstructor) } },211 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestPromiseRejectionEventConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 213 212 { "promise", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestPromiseRejectionEvent_promise), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 214 213 { "reason", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestPromiseRejectionEvent_reason), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, … … 268 267 return throwVMTypeError(lexicalGlobalObject, throwScope); 269 268 return JSValue::encode(JSTestPromiseRejectionEvent::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 270 }271 272 JSC_DEFINE_CUSTOM_SETTER(setJSTestPromiseRejectionEventConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))273 {274 VM& vm = JSC::getVM(lexicalGlobalObject);275 auto throwScope = DECLARE_THROW_SCOPE(vm);276 auto* prototype = jsDynamicCast<JSTestPromiseRejectionEventPrototype*>(vm, JSValue::decode(thisValue));277 if (UNLIKELY(!prototype)) {278 throwVMTypeError(lexicalGlobalObject, throwScope);279 return false;280 }281 // Shadowing a built-in constructor282 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));283 269 } 284 270 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestReadOnlyMapLike.cpp
r268551 r268710 61 61 62 62 JSC_DECLARE_CUSTOM_GETTER(jsTestReadOnlyMapLikeConstructor); 63 JSC_DECLARE_CUSTOM_SETTER(setJSTestReadOnlyMapLikeConstructor);64 63 JSC_DECLARE_CUSTOM_GETTER(jsTestReadOnlyMapLike_size); 65 64 … … 117 116 static const HashTableValue JSTestReadOnlyMapLikePrototypeTableValues[] = 118 117 { 119 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestReadOnlyMapLikeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestReadOnlyMapLikeConstructor) } },118 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestReadOnlyMapLikeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 120 119 { "size", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestReadOnlyMapLike_size), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 121 120 { "get", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestReadOnlyMapLikePrototypeFunction_get), (intptr_t) (1) } }, … … 192 191 return throwVMTypeError(lexicalGlobalObject, throwScope); 193 192 return JSValue::encode(JSTestReadOnlyMapLike::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 194 }195 196 JSC_DEFINE_CUSTOM_SETTER(setJSTestReadOnlyMapLikeConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))197 {198 VM& vm = JSC::getVM(lexicalGlobalObject);199 auto throwScope = DECLARE_THROW_SCOPE(vm);200 auto* prototype = jsDynamicCast<JSTestReadOnlyMapLikePrototype*>(vm, JSValue::decode(thisValue));201 if (UNLIKELY(!prototype)) {202 throwVMTypeError(lexicalGlobalObject, throwScope);203 return false;204 }205 // Shadowing a built-in constructor206 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));207 193 } 208 194 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestReadOnlySetLike.cpp
r268551 r268710 60 60 61 61 JSC_DECLARE_CUSTOM_GETTER(jsTestReadOnlySetLikeConstructor); 62 JSC_DECLARE_CUSTOM_SETTER(setJSTestReadOnlySetLikeConstructor);63 62 JSC_DECLARE_CUSTOM_GETTER(jsTestReadOnlySetLike_size); 64 63 … … 116 115 static const HashTableValue JSTestReadOnlySetLikePrototypeTableValues[] = 117 116 { 118 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestReadOnlySetLikeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestReadOnlySetLikeConstructor) } },117 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestReadOnlySetLikeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 119 118 { "size", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestReadOnlySetLike_size), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 120 119 { "has", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestReadOnlySetLikePrototypeFunction_has), (intptr_t) (1) } }, … … 190 189 return throwVMTypeError(lexicalGlobalObject, throwScope); 191 190 return JSValue::encode(JSTestReadOnlySetLike::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 192 }193 194 JSC_DEFINE_CUSTOM_SETTER(setJSTestReadOnlySetLikeConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))195 {196 VM& vm = JSC::getVM(lexicalGlobalObject);197 auto throwScope = DECLARE_THROW_SCOPE(vm);198 auto* prototype = jsDynamicCast<JSTestReadOnlySetLikePrototype*>(vm, JSValue::decode(thisValue));199 if (UNLIKELY(!prototype)) {200 throwVMTypeError(lexicalGlobalObject, throwScope);201 return false;202 }203 // Shadowing a built-in constructor204 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));205 191 } 206 192 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestReportExtraMemoryCost.cpp
r267891 r268710 46 46 47 47 JSC_DECLARE_CUSTOM_GETTER(jsTestReportExtraMemoryCostConstructor); 48 JSC_DECLARE_CUSTOM_SETTER(setJSTestReportExtraMemoryCostConstructor);49 48 50 49 class JSTestReportExtraMemoryCostPrototype final : public JSC::JSNonFinalObject { … … 101 100 static const HashTableValue JSTestReportExtraMemoryCostPrototypeTableValues[] = 102 101 { 103 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestReportExtraMemoryCostConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestReportExtraMemoryCostConstructor) } },102 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestReportExtraMemoryCostConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 104 103 }; 105 104 … … 159 158 return throwVMTypeError(lexicalGlobalObject, throwScope); 160 159 return JSValue::encode(JSTestReportExtraMemoryCost::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 161 }162 163 JSC_DEFINE_CUSTOM_SETTER(setJSTestReportExtraMemoryCostConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))164 {165 VM& vm = JSC::getVM(lexicalGlobalObject);166 auto throwScope = DECLARE_THROW_SCOPE(vm);167 auto* prototype = jsDynamicCast<JSTestReportExtraMemoryCostPrototype*>(vm, JSValue::decode(thisValue));168 if (UNLIKELY(!prototype)) {169 throwVMTypeError(lexicalGlobalObject, throwScope);170 return false;171 }172 // Shadowing a built-in constructor173 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));174 160 } 175 161 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
r268551 r268710 63 63 64 64 JSC_DECLARE_CUSTOM_GETTER(jsTestSerializedScriptValueInterfaceConstructor); 65 JSC_DECLARE_CUSTOM_SETTER(setJSTestSerializedScriptValueInterfaceConstructor);66 65 JSC_DECLARE_CUSTOM_GETTER(jsTestSerializedScriptValueInterface_value); 67 66 JSC_DECLARE_CUSTOM_SETTER(setJSTestSerializedScriptValueInterface_value); … … 125 124 static const HashTableValue JSTestSerializedScriptValueInterfacePrototypeTableValues[] = 126 125 { 127 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestSerializedScriptValueInterfaceConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestSerializedScriptValueInterfaceConstructor) } },126 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestSerializedScriptValueInterfaceConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 128 127 { "value", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestSerializedScriptValueInterface_value), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestSerializedScriptValueInterface_value) } }, 129 128 { "readonlyValue", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestSerializedScriptValueInterface_readonlyValue), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, … … 199 198 return throwVMTypeError(lexicalGlobalObject, throwScope); 200 199 return JSValue::encode(JSTestSerializedScriptValueInterface::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 201 }202 203 JSC_DEFINE_CUSTOM_SETTER(setJSTestSerializedScriptValueInterfaceConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))204 {205 VM& vm = JSC::getVM(lexicalGlobalObject);206 auto throwScope = DECLARE_THROW_SCOPE(vm);207 auto* prototype = jsDynamicCast<JSTestSerializedScriptValueInterfacePrototype*>(vm, JSValue::decode(thisValue));208 if (UNLIKELY(!prototype)) {209 throwVMTypeError(lexicalGlobalObject, throwScope);210 return false;211 }212 // Shadowing a built-in constructor213 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));214 200 } 215 201 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSetLike.cpp
r268551 r268710 63 63 64 64 JSC_DECLARE_CUSTOM_GETTER(jsTestSetLikeConstructor); 65 JSC_DECLARE_CUSTOM_SETTER(setJSTestSetLikeConstructor);66 65 JSC_DECLARE_CUSTOM_GETTER(jsTestSetLike_size); 67 66 … … 119 118 static const HashTableValue JSTestSetLikePrototypeTableValues[] = 120 119 { 121 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestSetLikeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestSetLikeConstructor) } },120 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestSetLikeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 122 121 { "size", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestSetLike_size), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 123 122 { "has", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestSetLikePrototypeFunction_has), (intptr_t) (1) } }, … … 196 195 return throwVMTypeError(lexicalGlobalObject, throwScope); 197 196 return JSValue::encode(JSTestSetLike::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 198 }199 200 JSC_DEFINE_CUSTOM_SETTER(setJSTestSetLikeConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))201 {202 VM& vm = JSC::getVM(lexicalGlobalObject);203 auto throwScope = DECLARE_THROW_SCOPE(vm);204 auto* prototype = jsDynamicCast<JSTestSetLikePrototype*>(vm, JSValue::decode(thisValue));205 if (UNLIKELY(!prototype)) {206 throwVMTypeError(lexicalGlobalObject, throwScope);207 return false;208 }209 // Shadowing a built-in constructor210 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));211 197 } 212 198 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSetLikeWithOverriddenOperations.cpp
r268551 r268710 63 63 64 64 JSC_DECLARE_CUSTOM_GETTER(jsTestSetLikeWithOverriddenOperationsConstructor); 65 JSC_DECLARE_CUSTOM_SETTER(setJSTestSetLikeWithOverriddenOperationsConstructor);66 65 JSC_DECLARE_CUSTOM_GETTER(jsTestSetLikeWithOverriddenOperations_add); 67 66 JSC_DECLARE_CUSTOM_SETTER(setJSTestSetLikeWithOverriddenOperations_add); … … 121 120 static const HashTableValue JSTestSetLikeWithOverriddenOperationsPrototypeTableValues[] = 122 121 { 123 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestSetLikeWithOverriddenOperationsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestSetLikeWithOverriddenOperationsConstructor) } },122 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestSetLikeWithOverriddenOperationsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 124 123 { "add", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestSetLikeWithOverriddenOperations_add), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestSetLikeWithOverriddenOperations_add) } }, 125 124 { "size", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestSetLikeWithOverriddenOperations_size), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, … … 198 197 return throwVMTypeError(lexicalGlobalObject, throwScope); 199 198 return JSValue::encode(JSTestSetLikeWithOverriddenOperations::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 200 }201 202 JSC_DEFINE_CUSTOM_SETTER(setJSTestSetLikeWithOverriddenOperationsConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))203 {204 VM& vm = JSC::getVM(lexicalGlobalObject);205 auto throwScope = DECLARE_THROW_SCOPE(vm);206 auto* prototype = jsDynamicCast<JSTestSetLikeWithOverriddenOperationsPrototype*>(vm, JSValue::decode(thisValue));207 if (UNLIKELY(!prototype)) {208 throwVMTypeError(lexicalGlobalObject, throwScope);209 return false;210 }211 // Shadowing a built-in constructor212 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));213 199 } 214 200 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStringifier.cpp
r268551 r268710 52 52 53 53 JSC_DECLARE_CUSTOM_GETTER(jsTestStringifierConstructor); 54 JSC_DECLARE_CUSTOM_SETTER(setJSTestStringifierConstructor);55 54 56 55 class JSTestStringifierPrototype final : public JSC::JSNonFinalObject { … … 107 106 static const HashTableValue JSTestStringifierPrototypeTableValues[] = 108 107 { 109 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestStringifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestStringifierConstructor) } },108 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestStringifierConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 110 109 { "toString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestStringifierPrototypeFunction_toString), (intptr_t) (0) } }, 111 110 }; … … 170 169 return throwVMTypeError(lexicalGlobalObject, throwScope); 171 170 return JSValue::encode(JSTestStringifier::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 172 }173 174 JSC_DEFINE_CUSTOM_SETTER(setJSTestStringifierConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))175 {176 VM& vm = JSC::getVM(lexicalGlobalObject);177 auto throwScope = DECLARE_THROW_SCOPE(vm);178 auto* prototype = jsDynamicCast<JSTestStringifierPrototype*>(vm, JSValue::decode(thisValue));179 if (UNLIKELY(!prototype)) {180 throwVMTypeError(lexicalGlobalObject, throwScope);181 return false;182 }183 // Shadowing a built-in constructor184 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));185 171 } 186 172 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp
r268551 r268710 52 52 53 53 JSC_DECLARE_CUSTOM_GETTER(jsTestStringifierAnonymousOperationConstructor); 54 JSC_DECLARE_CUSTOM_SETTER(setJSTestStringifierAnonymousOperationConstructor);55 54 56 55 class JSTestStringifierAnonymousOperationPrototype final : public JSC::JSNonFinalObject { … … 107 106 static const HashTableValue JSTestStringifierAnonymousOperationPrototypeTableValues[] = 108 107 { 109 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestStringifierAnonymousOperationConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestStringifierAnonymousOperationConstructor) } },108 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestStringifierAnonymousOperationConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 110 109 { "toString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestStringifierAnonymousOperationPrototypeFunction_toString), (intptr_t) (0) } }, 111 110 }; … … 170 169 return throwVMTypeError(lexicalGlobalObject, throwScope); 171 170 return JSValue::encode(JSTestStringifierAnonymousOperation::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 172 }173 174 JSC_DEFINE_CUSTOM_SETTER(setJSTestStringifierAnonymousOperationConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))175 {176 VM& vm = JSC::getVM(lexicalGlobalObject);177 auto throwScope = DECLARE_THROW_SCOPE(vm);178 auto* prototype = jsDynamicCast<JSTestStringifierAnonymousOperationPrototype*>(vm, JSValue::decode(thisValue));179 if (UNLIKELY(!prototype)) {180 throwVMTypeError(lexicalGlobalObject, throwScope);181 return false;182 }183 // Shadowing a built-in constructor184 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));185 171 } 186 172 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp
r268551 r268710 53 53 54 54 JSC_DECLARE_CUSTOM_GETTER(jsTestStringifierNamedOperationConstructor); 55 JSC_DECLARE_CUSTOM_SETTER(setJSTestStringifierNamedOperationConstructor);56 55 57 56 class JSTestStringifierNamedOperationPrototype final : public JSC::JSNonFinalObject { … … 108 107 static const HashTableValue JSTestStringifierNamedOperationPrototypeTableValues[] = 109 108 { 110 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestStringifierNamedOperationConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestStringifierNamedOperationConstructor) } },109 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestStringifierNamedOperationConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 111 110 { "identifier", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestStringifierNamedOperationPrototypeFunction_identifier), (intptr_t) (0) } }, 112 111 { "toString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestStringifierNamedOperationPrototypeFunction_toString), (intptr_t) (0) } }, … … 172 171 return throwVMTypeError(lexicalGlobalObject, throwScope); 173 172 return JSValue::encode(JSTestStringifierNamedOperation::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 174 }175 176 JSC_DEFINE_CUSTOM_SETTER(setJSTestStringifierNamedOperationConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))177 {178 VM& vm = JSC::getVM(lexicalGlobalObject);179 auto throwScope = DECLARE_THROW_SCOPE(vm);180 auto* prototype = jsDynamicCast<JSTestStringifierNamedOperationPrototype*>(vm, JSValue::decode(thisValue));181 if (UNLIKELY(!prototype)) {182 throwVMTypeError(lexicalGlobalObject, throwScope);183 return false;184 }185 // Shadowing a built-in constructor186 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));187 173 } 188 174 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp
r268551 r268710 53 53 54 54 JSC_DECLARE_CUSTOM_GETTER(jsTestStringifierOperationImplementedAsConstructor); 55 JSC_DECLARE_CUSTOM_SETTER(setJSTestStringifierOperationImplementedAsConstructor);56 55 57 56 class JSTestStringifierOperationImplementedAsPrototype final : public JSC::JSNonFinalObject { … … 108 107 static const HashTableValue JSTestStringifierOperationImplementedAsPrototypeTableValues[] = 109 108 { 110 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestStringifierOperationImplementedAsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestStringifierOperationImplementedAsConstructor) } },109 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestStringifierOperationImplementedAsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 111 110 { "identifier", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestStringifierOperationImplementedAsPrototypeFunction_identifier), (intptr_t) (0) } }, 112 111 { "toString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestStringifierOperationImplementedAsPrototypeFunction_toString), (intptr_t) (0) } }, … … 172 171 return throwVMTypeError(lexicalGlobalObject, throwScope); 173 172 return JSValue::encode(JSTestStringifierOperationImplementedAs::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 174 }175 176 JSC_DEFINE_CUSTOM_SETTER(setJSTestStringifierOperationImplementedAsConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))177 {178 VM& vm = JSC::getVM(lexicalGlobalObject);179 auto throwScope = DECLARE_THROW_SCOPE(vm);180 auto* prototype = jsDynamicCast<JSTestStringifierOperationImplementedAsPrototype*>(vm, JSValue::decode(thisValue));181 if (UNLIKELY(!prototype)) {182 throwVMTypeError(lexicalGlobalObject, throwScope);183 return false;184 }185 // Shadowing a built-in constructor186 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));187 173 } 188 174 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp
r268551 r268710 52 52 53 53 JSC_DECLARE_CUSTOM_GETTER(jsTestStringifierOperationNamedToStringConstructor); 54 JSC_DECLARE_CUSTOM_SETTER(setJSTestStringifierOperationNamedToStringConstructor);55 54 56 55 class JSTestStringifierOperationNamedToStringPrototype final : public JSC::JSNonFinalObject { … … 107 106 static const HashTableValue JSTestStringifierOperationNamedToStringPrototypeTableValues[] = 108 107 { 109 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestStringifierOperationNamedToStringConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestStringifierOperationNamedToStringConstructor) } },108 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestStringifierOperationNamedToStringConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 110 109 { "toString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestStringifierOperationNamedToStringPrototypeFunction_toString), (intptr_t) (0) } }, 111 110 }; … … 170 169 return throwVMTypeError(lexicalGlobalObject, throwScope); 171 170 return JSValue::encode(JSTestStringifierOperationNamedToString::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 172 }173 174 JSC_DEFINE_CUSTOM_SETTER(setJSTestStringifierOperationNamedToStringConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))175 {176 VM& vm = JSC::getVM(lexicalGlobalObject);177 auto throwScope = DECLARE_THROW_SCOPE(vm);178 auto* prototype = jsDynamicCast<JSTestStringifierOperationNamedToStringPrototype*>(vm, JSValue::decode(thisValue));179 if (UNLIKELY(!prototype)) {180 throwVMTypeError(lexicalGlobalObject, throwScope);181 return false;182 }183 // Shadowing a built-in constructor184 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));185 171 } 186 172 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp
r268551 r268710 53 53 54 54 JSC_DECLARE_CUSTOM_GETTER(jsTestStringifierReadOnlyAttributeConstructor); 55 JSC_DECLARE_CUSTOM_SETTER(setJSTestStringifierReadOnlyAttributeConstructor);56 55 JSC_DECLARE_CUSTOM_GETTER(jsTestStringifierReadOnlyAttribute_identifier); 57 56 … … 109 108 static const HashTableValue JSTestStringifierReadOnlyAttributePrototypeTableValues[] = 110 109 { 111 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestStringifierReadOnlyAttributeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestStringifierReadOnlyAttributeConstructor) } },110 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestStringifierReadOnlyAttributeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 112 111 { "identifier", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestStringifierReadOnlyAttribute_identifier), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 113 112 { "toString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestStringifierReadOnlyAttributePrototypeFunction_toString), (intptr_t) (0) } }, … … 178 177 return throwVMTypeError(lexicalGlobalObject, throwScope); 179 178 return JSValue::encode(JSTestStringifierReadOnlyAttribute::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 180 }181 182 JSC_DEFINE_CUSTOM_SETTER(setJSTestStringifierReadOnlyAttributeConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))183 {184 VM& vm = JSC::getVM(lexicalGlobalObject);185 auto throwScope = DECLARE_THROW_SCOPE(vm);186 auto* prototype = jsDynamicCast<JSTestStringifierReadOnlyAttributePrototype*>(vm, JSValue::decode(thisValue));187 if (UNLIKELY(!prototype)) {188 throwVMTypeError(lexicalGlobalObject, throwScope);189 return false;190 }191 // Shadowing a built-in constructor192 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));193 179 } 194 180 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp
r268551 r268710 53 53 54 54 JSC_DECLARE_CUSTOM_GETTER(jsTestStringifierReadWriteAttributeConstructor); 55 JSC_DECLARE_CUSTOM_SETTER(setJSTestStringifierReadWriteAttributeConstructor);56 55 JSC_DECLARE_CUSTOM_GETTER(jsTestStringifierReadWriteAttribute_identifier); 57 56 JSC_DECLARE_CUSTOM_SETTER(setJSTestStringifierReadWriteAttribute_identifier); … … 110 109 static const HashTableValue JSTestStringifierReadWriteAttributePrototypeTableValues[] = 111 110 { 112 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestStringifierReadWriteAttributeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestStringifierReadWriteAttributeConstructor) } },111 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestStringifierReadWriteAttributeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 113 112 { "identifier", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestStringifierReadWriteAttribute_identifier), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestStringifierReadWriteAttribute_identifier) } }, 114 113 { "toString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestStringifierReadWriteAttributePrototypeFunction_toString), (intptr_t) (0) } }, … … 179 178 return throwVMTypeError(lexicalGlobalObject, throwScope); 180 179 return JSValue::encode(JSTestStringifierReadWriteAttribute::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 181 }182 183 JSC_DEFINE_CUSTOM_SETTER(setJSTestStringifierReadWriteAttributeConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))184 {185 VM& vm = JSC::getVM(lexicalGlobalObject);186 auto throwScope = DECLARE_THROW_SCOPE(vm);187 auto* prototype = jsDynamicCast<JSTestStringifierReadWriteAttributePrototype*>(vm, JSValue::decode(thisValue));188 if (UNLIKELY(!prototype)) {189 throwVMTypeError(lexicalGlobalObject, throwScope);190 return false;191 }192 // Shadowing a built-in constructor193 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));194 180 } 195 181 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
r268551 r268710 85 85 86 86 JSC_DECLARE_CUSTOM_GETTER(jsTestTypedefsConstructor); 87 JSC_DECLARE_CUSTOM_SETTER(setJSTestTypedefsConstructor);88 87 JSC_DECLARE_CUSTOM_GETTER(jsTestTypedefs_unsignedLongLongAttr); 89 88 JSC_DECLARE_CUSTOM_SETTER(setJSTestTypedefs_unsignedLongLongAttr); … … 203 202 static const HashTableValue JSTestTypedefsPrototypeTableValues[] = 204 203 { 205 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSTestTypedefsConstructor) } },204 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 206 205 { "unsignedLongLongAttr", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefs_unsignedLongLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefs_unsignedLongLongAttr) } }, 207 206 { "serializedScriptValue", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefs_serializedScriptValue), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefs_serializedScriptValue) } }, … … 293 292 } 294 293 295 JSC_DEFINE_CUSTOM_SETTER(setJSTestTypedefsConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))296 {297 VM& vm = JSC::getVM(lexicalGlobalObject);298 auto throwScope = DECLARE_THROW_SCOPE(vm);299 auto* prototype = jsDynamicCast<JSTestTypedefsPrototype*>(vm, JSValue::decode(thisValue));300 if (UNLIKELY(!prototype)) {301 throwVMTypeError(lexicalGlobalObject, throwScope);302 return false;303 }304 // Shadowing a built-in constructor305 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));306 }307 308 294 static inline JSValue jsTestTypedefs_unsignedLongLongAttrGetter(JSGlobalObject& lexicalGlobalObject, JSTestTypedefs& thisObject) 309 295 { -
trunk/Source/WebCore/bindings/scripts/test/JS/JSWorkerGlobalScope.cpp
r268551 r268710 53 53 54 54 JSC_DECLARE_CUSTOM_GETTER(jsWorkerGlobalScopeConstructor); 55 JSC_DECLARE_CUSTOM_SETTER(setJSWorkerGlobalScopeConstructor);56 55 JSC_DECLARE_CUSTOM_GETTER(jsWorkerGlobalScope_ExposedToWorkerAndWindowConstructor); 57 56 JSC_DECLARE_CUSTOM_SETTER(setJSWorkerGlobalScope_ExposedToWorkerAndWindowConstructor); … … 128 127 static const HashTableValue JSWorkerGlobalScopePrototypeTableValues[] = 129 128 { 130 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSWorkerGlobalScopeConstructor) } },129 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkerGlobalScopeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 131 130 }; 132 131 … … 184 183 return throwVMTypeError(lexicalGlobalObject, throwScope); 185 184 return JSValue::encode(JSWorkerGlobalScope::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 186 }187 188 JSC_DEFINE_CUSTOM_SETTER(setJSWorkerGlobalScopeConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))189 {190 VM& vm = JSC::getVM(lexicalGlobalObject);191 auto throwScope = DECLARE_THROW_SCOPE(vm);192 auto* prototype = jsDynamicCast<JSWorkerGlobalScopePrototype*>(vm, JSValue::decode(thisValue));193 if (UNLIKELY(!prototype)) {194 throwVMTypeError(lexicalGlobalObject, throwScope);195 return false;196 }197 // Shadowing a built-in constructor198 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));199 185 } 200 186 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSWorkletGlobalScope.cpp
r268551 r268710 48 48 49 49 JSC_DECLARE_CUSTOM_GETTER(jsWorkletGlobalScopeConstructor); 50 JSC_DECLARE_CUSTOM_SETTER(setJSWorkletGlobalScopeConstructor);51 50 JSC_DECLARE_CUSTOM_GETTER(jsWorkletGlobalScope_WorkletGlobalScopeConstructor); 52 51 JSC_DECLARE_CUSTOM_SETTER(setJSWorkletGlobalScope_WorkletGlobalScopeConstructor); … … 92 91 static const HashTableValue JSWorkletGlobalScopePrototypeTableValues[] = 93 92 { 94 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkletGlobalScopeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>( setJSWorkletGlobalScopeConstructor) } },93 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWorkletGlobalScopeConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } }, 95 94 }; 96 95 … … 148 147 return throwVMTypeError(lexicalGlobalObject, throwScope); 149 148 return JSValue::encode(JSWorkletGlobalScope::getConstructor(JSC::getVM(lexicalGlobalObject), prototype->globalObject())); 150 }151 152 JSC_DEFINE_CUSTOM_SETTER(setJSWorkletGlobalScopeConstructor, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue))153 {154 VM& vm = JSC::getVM(lexicalGlobalObject);155 auto throwScope = DECLARE_THROW_SCOPE(vm);156 auto* prototype = jsDynamicCast<JSWorkletGlobalScopePrototype*>(vm, JSValue::decode(thisValue));157 if (UNLIKELY(!prototype)) {158 throwVMTypeError(lexicalGlobalObject, throwScope);159 return false;160 }161 // Shadowing a built-in constructor162 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));163 149 } 164 150
Note: See TracChangeset
for help on using the changeset viewer.