Title: [287183] releases/WebKitGTK/webkit-2.34/Source
Revision
287183
Author
[email protected]
Date
2021-12-17 06:22:56 -0800 (Fri, 17 Dec 2021)

Log Message

Merge r283444 - Remove JSC hack after r283410
https://bugs.webkit.org/show_bug.cgi?id=230261

Reviewed by Mark Lam.

Source/_javascript_Core:

* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertyDescriptor):
* runtime/PropertySlot.h:

Source/WebCore:

We revert a hack for accessors in JSC since this is not necessary.

* bindings/scripts/CodeGeneratorJS.pm:
(GetJSCAttributesForAttribute):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjDOMConstructor::construct):
(WebCore::jsTestObj_searchGetter):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):
(WebCore::setJSTestObj_searchSetter):
(WebCore::JSC_DEFINE_CUSTOM_SETTER):
* bindings/scripts/test/TestObj.idl:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.34/Source/_javascript_Core/ChangeLog (287182 => 287183)


--- releases/WebKitGTK/webkit-2.34/Source/_javascript_Core/ChangeLog	2021-12-17 14:20:05 UTC (rev 287182)
+++ releases/WebKitGTK/webkit-2.34/Source/_javascript_Core/ChangeLog	2021-12-17 14:22:56 UTC (rev 287183)
@@ -1,3 +1,14 @@
+2021-10-02  Yusuke Suzuki  <[email protected]>
+
+        Remove JSC hack after r283410
+        https://bugs.webkit.org/show_bug.cgi?id=230261
+
+        Reviewed by Mark Lam.
+
+        * runtime/JSObject.cpp:
+        (JSC::JSObject::getOwnPropertyDescriptor):
+        * runtime/PropertySlot.h:
+
 2021-10-01  Yusuke Suzuki  <[email protected]>
 
         Disable new incumbent-window until it is fully implemented

Modified: releases/WebKitGTK/webkit-2.34/Source/_javascript_Core/runtime/JSObject.cpp (287182 => 287183)


--- releases/WebKitGTK/webkit-2.34/Source/_javascript_Core/runtime/JSObject.cpp	2021-12-17 14:20:05 UTC (rev 287182)
+++ releases/WebKitGTK/webkit-2.34/Source/_javascript_Core/runtime/JSObject.cpp	2021-12-17 14:22:56 UTC (rev 287183)
@@ -3677,8 +3677,6 @@
         ASSERT_WITH_MESSAGE(slot.isCustom(), "PropertySlot::TypeCustom is required in case of PropertyAttribute::CustomAccessor");
         descriptor.setAccessorDescriptor((slot.attributes() | PropertyAttribute::Accessor) & ~PropertyAttribute::CustomAccessor);
         JSGlobalObject* slotBaseGlobalObject = slot.slotBase()->globalObject(vm);
-        if (slot.attributes() & PropertyAttribute::DOMLegacyAccessor)
-            slotBaseGlobalObject = globalObject;
         if (slot.customGetter())
             descriptor.setGetter(createCustomGetterFunction(slotBaseGlobalObject, vm, propertyName, slot.customGetter(), slot.domAttribute()));
         if (slot.customSetter())

Modified: releases/WebKitGTK/webkit-2.34/Source/_javascript_Core/runtime/PropertySlot.h (287182 => 287183)


--- releases/WebKitGTK/webkit-2.34/Source/_javascript_Core/runtime/PropertySlot.h	2021-12-17 14:20:05 UTC (rev 287182)
+++ releases/WebKitGTK/webkit-2.34/Source/_javascript_Core/runtime/PropertySlot.h	2021-12-17 14:22:56 UTC (rev 287183)
@@ -45,7 +45,6 @@
     Accessor          = 1 << 4,  // property is a getter/setter
     CustomAccessor    = 1 << 5,
     CustomValue       = 1 << 6,
-    DOMLegacyAccessor = 1 << 7, // property is a DOM legacy accessor, which holds caller's global object when it is materialized.
     CustomAccessorOrValue = CustomAccessor | CustomValue,
     AccessorOrCustomAccessorOrValue = Accessor | CustomAccessor | CustomValue,
     ReadOnlyOrAccessorOrCustomAccessor = ReadOnly | Accessor | CustomAccessor,

Modified: releases/WebKitGTK/webkit-2.34/Source/WebCore/ChangeLog (287182 => 287183)


--- releases/WebKitGTK/webkit-2.34/Source/WebCore/ChangeLog	2021-12-17 14:20:05 UTC (rev 287182)
+++ releases/WebKitGTK/webkit-2.34/Source/WebCore/ChangeLog	2021-12-17 14:22:56 UTC (rev 287183)
@@ -1,3 +1,22 @@
+2021-10-02  Yusuke Suzuki  <[email protected]>
+
+        Remove JSC hack after r283410
+        https://bugs.webkit.org/show_bug.cgi?id=230261
+
+        Reviewed by Mark Lam.
+
+        We revert a hack for accessors in JSC since this is not necessary.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GetJSCAttributesForAttribute):
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::JSTestObjDOMConstructor::construct):
+        (WebCore::jsTestObj_searchGetter):
+        (WebCore::JSC_DEFINE_CUSTOM_GETTER):
+        (WebCore::setJSTestObj_searchSetter):
+        (WebCore::JSC_DEFINE_CUSTOM_SETTER):
+        * bindings/scripts/test/TestObj.idl:
+
 2021-10-01  Yusuke Suzuki  <[email protected]>
 
         Disable new incumbent-window until it is fully implemented

Modified: releases/WebKitGTK/webkit-2.34/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (287182 => 287183)


--- releases/WebKitGTK/webkit-2.34/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2021-12-17 14:20:05 UTC (rev 287182)
+++ releases/WebKitGTK/webkit-2.34/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2021-12-17 14:22:56 UTC (rev 287183)
@@ -2055,7 +2055,6 @@
     push(@specials, "JSC::PropertyAttribute::DontEnum") if ($attribute->extendedAttributes->{NotEnumerable} || $isGlobalConstructor);
     push(@specials, "JSC::PropertyAttribute::ReadOnly") if IsReadonly($attribute);
     push(@specials, "JSC::PropertyAttribute::CustomAccessor") unless $isGlobalConstructor or IsJSBuiltin($interface, $attribute);
-    push(@specials, "JSC::PropertyAttribute::DOMLegacyAccessor") if $attribute->extendedAttributes->{LegacyActiveWindowForAccessor};
     push(@specials, "JSC::PropertyAttribute::DOMAttribute") if IsAcceleratedDOMAttribute($interface, $attribute);
     push(@specials, "JSC::PropertyAttribute::DOMJITAttribute") if $attribute->extendedAttributes->{DOMJIT};
     push(@specials, "JSC::PropertyAttribute::Accessor | JSC::PropertyAttribute::Builtin") if  IsJSBuiltin($interface, $attribute);

Modified: releases/WebKitGTK/webkit-2.34/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (287182 => 287183)


--- releases/WebKitGTK/webkit-2.34/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2021-12-17 14:20:05 UTC (rev 287182)
+++ releases/WebKitGTK/webkit-2.34/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2021-12-17 14:22:56 UTC (rev 287183)
@@ -1847,6 +1847,8 @@
 static JSC_DECLARE_CUSTOM_SETTER(setJSTestObj_double_leading_underscore_attribute);
 static JSC_DECLARE_CUSTOM_GETTER(jsTestObj_trailing_underscore_attribute_);
 static JSC_DECLARE_CUSTOM_SETTER(setJSTestObj_trailing_underscore_attribute_);
+static JSC_DECLARE_CUSTOM_GETTER(jsTestObj_search);
+static JSC_DECLARE_CUSTOM_SETTER(setJSTestObj_search);
 
 class JSTestObjPrototype final : public JSC::JSNonFinalObject {
 public:
@@ -2181,6 +2183,7 @@
     { "leading_underscore_attribute", static_cast<unsigned>(JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObj_leading_underscore_attribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObj_leading_underscore_attribute) } },
     { "_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) } },
     { "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_) } },
+    { "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) } },
 #if ENABLE(TEST_FEATURE)
     { "enabledAtRuntimeOperation", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunction_enabledAtRuntimeOperation), (intptr_t) (1) } },
 #else
@@ -5326,6 +5329,37 @@
     return IDLAttribute<JSTestObj>::set<setJSTestObj_trailing_underscore_attribute_Setter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName);
 }
 
+static inline JSValue jsTestObj_searchGetter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject)
+{
+    auto& vm = JSC::getVM(&lexicalGlobalObject);
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    auto& impl = thisObject.wrapped();
+    RELEASE_AND_RETURN(throwScope, (toJS<IDLUSVString>(lexicalGlobalObject, throwScope, impl.search())));
+}
+
+JSC_DEFINE_CUSTOM_GETTER(jsTestObj_search, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, PropertyName attributeName))
+{
+    return IDLAttribute<JSTestObj>::get<jsTestObj_searchGetter, CastedThisErrorBehavior::Assert>(*lexicalGlobalObject, thisValue, attributeName);
+}
+
+static inline bool setJSTestObj_searchSetter(JSGlobalObject& lexicalGlobalObject, JSTestObj& thisObject, JSValue value)
+{
+    auto& vm = JSC::getVM(&lexicalGlobalObject);
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    auto& impl = thisObject.wrapped();
+    auto nativeValue = convert<IDLUSVString>(lexicalGlobalObject, value);
+    RETURN_IF_EXCEPTION(throwScope, false);
+    invokeFunctorPropagatingExceptionIfNecessary(lexicalGlobalObject, throwScope, [&] {
+        return impl.setSearch(legacyActiveDOMWindowForAccessor(*jsCast<JSDOMGlobalObject*>(&lexicalGlobalObject)), firstDOMWindow(*jsCast<JSDOMGlobalObject*>(&lexicalGlobalObject)), WTFMove(nativeValue));
+    });
+    return true;
+}
+
+JSC_DEFINE_CUSTOM_SETTER(setJSTestObj_search, (JSGlobalObject* lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName))
+{
+    return IDLAttribute<JSTestObj>::set<setJSTestObj_searchSetter>(*lexicalGlobalObject, thisValue, encodedValue, attributeName);
+}
+
 #if ENABLE(TEST_FEATURE)
 static inline JSC::EncodedJSValue jsTestObjPrototypeFunction_enabledAtRuntimeOperation1Body(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
 {

Modified: releases/WebKitGTK/webkit-2.34/Source/WebCore/bindings/scripts/test/TestObj.idl (287182 => 287183)


--- releases/WebKitGTK/webkit-2.34/Source/WebCore/bindings/scripts/test/TestObj.idl	2021-12-17 14:20:05 UTC (rev 287182)
+++ releases/WebKitGTK/webkit-2.34/Source/WebCore/bindings/scripts/test/TestObj.idl	2021-12-17 14:22:56 UTC (rev 287183)
@@ -455,6 +455,8 @@
     boolean bigUint64(BigUint64Array destination);
     boolean bigInt64AllowShared([AllowShared] BigInt64Array destination);
     boolean bigUint64AllowShared([AllowShared] BigUint64Array destination);
+
+    [SetterCallWith=LegacyActiveWindowForAccessor&FirstWindow] attribute USVString search;
 };
 
 // The following comments should not generate any code.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to