Changeset 283444 in webkit
- Timestamp:
- Oct 2, 2021, 12:15:28 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
-
JavaScriptCore/ChangeLog (modified) (1 diff)
-
JavaScriptCore/runtime/JSObject.cpp (modified) (1 diff)
-
JavaScriptCore/runtime/PropertySlot.h (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/bindings/scripts/CodeGeneratorJS.pm (modified) (1 diff)
-
WebCore/bindings/scripts/test/JS/JSTestObj.cpp (modified) (3 diffs)
-
WebCore/bindings/scripts/test/TestObj.idl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r283435 r283444 1 2021-10-02 Yusuke Suzuki <ysuzuki@apple.com> 2 3 Remove JSC hack after r283410 4 https://bugs.webkit.org/show_bug.cgi?id=230261 5 6 Reviewed by Mark Lam. 7 8 * runtime/JSObject.cpp: 9 (JSC::JSObject::getOwnPropertyDescriptor): 10 * runtime/PropertySlot.h: 11 1 12 2021-10-01 Commit Queue <commit-queue@webkit.org> 2 13 -
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r283410 r283444 3678 3678 descriptor.setAccessorDescriptor((slot.attributes() | PropertyAttribute::Accessor) & ~PropertyAttribute::CustomAccessor); 3679 3679 JSGlobalObject* slotBaseGlobalObject = slot.slotBase()->globalObject(vm); 3680 if (slot.attributes() & PropertyAttribute::DOMLegacyAccessor)3681 slotBaseGlobalObject = globalObject;3682 3680 if (slot.customGetter()) 3683 3681 descriptor.setGetter(createCustomGetterFunction(slotBaseGlobalObject, vm, propertyName, slot.customGetter(), slot.domAttribute())); -
trunk/Source/JavaScriptCore/runtime/PropertySlot.h
r283410 r283444 46 46 CustomAccessor = 1 << 5, 47 47 CustomValue = 1 << 6, 48 DOMLegacyAccessor = 1 << 7, // property is a DOM legacy accessor, which holds caller's global object when it is materialized.49 48 CustomAccessorOrValue = CustomAccessor | CustomValue, 50 49 AccessorOrCustomAccessorOrValue = Accessor | CustomAccessor | CustomValue, -
trunk/Source/WebCore/ChangeLog
r283443 r283444 1 2021-10-02 Yusuke Suzuki <ysuzuki@apple.com> 2 3 Remove JSC hack after r283410 4 https://bugs.webkit.org/show_bug.cgi?id=230261 5 6 Reviewed by Mark Lam. 7 8 We revert a hack for accessors in JSC since this is not necessary. 9 10 * bindings/scripts/CodeGeneratorJS.pm: 11 (GetJSCAttributesForAttribute): 12 * bindings/scripts/test/JS/JSTestObj.cpp: 13 (WebCore::JSTestObjDOMConstructor::construct): 14 (WebCore::jsTestObj_searchGetter): 15 (WebCore::JSC_DEFINE_CUSTOM_GETTER): 16 (WebCore::setJSTestObj_searchSetter): 17 (WebCore::JSC_DEFINE_CUSTOM_SETTER): 18 * bindings/scripts/test/TestObj.idl: 19 1 20 2021-10-02 Antti Koivisto <antti@apple.com> 2 21 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r283410 r283444 2051 2051 push(@specials, "JSC::PropertyAttribute::ReadOnly") if IsReadonly($attribute); 2052 2052 push(@specials, "JSC::PropertyAttribute::CustomAccessor") unless $isGlobalConstructor or IsJSBuiltin($interface, $attribute); 2053 push(@specials, "JSC::PropertyAttribute::DOMLegacyAccessor") if $attribute->extendedAttributes->{LegacyActiveWindowForAccessor};2054 2053 push(@specials, "JSC::PropertyAttribute::DOMAttribute") if IsAcceleratedDOMAttribute($interface, $attribute); 2055 2054 push(@specials, "JSC::PropertyAttribute::DOMJITAttribute") if $attribute->extendedAttributes->{DOMJIT}; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r283233 r283444 1848 1848 static JSC_DECLARE_CUSTOM_GETTER(jsTestObj_trailing_underscore_attribute_); 1849 1849 static JSC_DECLARE_CUSTOM_SETTER(setJSTestObj_trailing_underscore_attribute_); 1850 static JSC_DECLARE_CUSTOM_GETTER(jsTestObj_search); 1851 static JSC_DECLARE_CUSTOM_SETTER(setJSTestObj_search); 1850 1852 1851 1853 class JSTestObjPrototype final : public JSC::JSNonFinalObject { … … 2184 2186 { "_double_leading_underscore_attribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObj_double_leading_underscore_attribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObj_double_leading_underscore_attribute) } }, 2185 2187 { "trailing_underscore_attribute_", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObj_trailing_underscore_attribute_), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObj_trailing_underscore_attribute_) } }, 2188 { "search", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObj_search), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObj_search) } }, 2186 2189 #if ENABLE(TEST_FEATURE) 2187 2190 { "enabledAtRuntimeOperation", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunction_enabledAtRuntimeOperation), (intptr_t) (1) } }, … … 5329 5332 } 5330 5333 5334 static inline JSValue jsTestObj_searchGetter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject) 5335 { 5336 auto& vm = JSC::getVM(&lexicalGlobalObject); 5337 auto throwScope = DECLARE_THROW_SCOPE(vm); 5338 auto& impl = thisObject.wrapped(); 5339 RELEASE_AND_RETURN(throwScope, (toJS<IDLUSVString>(lexicalGlobalObject, throwScope, impl.search()))); 5340 } 5341 5342 JSC_DEFINE_CUSTOM_GETTER(jsTestObj_search, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName attributeName)) 5343 { 5344 return IDLAttribute<JSTestObj>::get<jsTestObj_searchGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName); 5345 } 5346 5347 static inline bool setJSTestObj_searchSetter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject, JSValue value) 5348 { 5349 auto& vm = JSC::getVM(&lexicalGlobalObject); 5350 auto throwScope = DECLARE_THROW_SCOPE(vm); 5351 auto& impl = thisObject.wrapped(); 5352 auto nativeValue = convert<IDLUSVString>(lexicalGlobalObject, value); 5353 RETURN_IF_EXCEPTION(throwScope, false); 5354 invokeFunctorPropagatingExceptionIfNecessary(lexicalGlobalObject, throwScope, [&] { 5355 return impl.setSearch(legacyActiveDOMWindowForAccessor(*jsCast<JSDOMGlobalObject*>(&lexicalGlobalObject)), firstDOMWindow(*jsCast<JSDOMGlobalObject*>(&lexicalGlobalObject)), WTFMove(nativeValue)); 5356 }); 5357 return true; 5358 } 5359 5360 JSC_DEFINE_CUSTOM_SETTER(setJSTestObj_search, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName)) 5361 { 5362 return IDLAttribute<JSTestObj>::set<setJSTestObj_searchSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName); 5363 } 5364 5331 5365 #if ENABLE(TEST_FEATURE) 5332 5366 static inline JSC::EncodedJSValue jsTestObjPrototypeFunction_enabledAtRuntimeOperation1Body(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis) -
trunk/Source/WebCore/bindings/scripts/test/TestObj.idl
r280256 r283444 456 456 boolean bigInt64AllowShared([AllowShared] BigInt64Array destination); 457 457 boolean bigUint64AllowShared([AllowShared] BigUint64Array destination); 458 459 [SetterCallWith=LegacyActiveWindowForAccessor&FirstWindow] attribute USVString search; 458 460 }; 459 461
Note:
See TracChangeset
for help on using the changeset viewer.