WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
243655
Add `JSGenerateToNativeObject` attributes to `Text`
https://bugs.webkit.org/show_bug.cgi?id=243655
Summary
Add `JSGenerateToNativeObject` attributes to `Text`
Tetsuharu Ohzeki [UTC+9]
Reported
2022-08-08 00:27:07 PDT
If we don't add this attribute, HTMLSlotElement.assign() in
bug 218692
will be compile error with following errors. ``` In file included from /src/webkit/WebKitBuild/Debug/DerivedSources/WebCore/JSHTMLFormElement.cpp:37: /src/webkit/Source/WebCore/bindings/js/JSDOMConvertInterface.h:43:16: error: cannot initialize return object of type 'WebCore::JSToWrappedOverloader<WebCore::Text>::ReturnType' (aka 'WebCore::Text *') with an rvalue of type 'WebCore::Node *' return WrapperType::toWrapped(JSC::getVM(&lexicalGlobalObject), value); In file included from /src/webkit/WebKitBuild/Debug/DerivedSources/WebCore/unified-sources/UnifiedSource10.cpp:1: In file included from /src/webkit/WebKitBuild/Debug/DerivedSources/WebCore/JSHTMLFormElement.cpp:41: /src/webkit/Source/WebCore/bindings/js/JSDOMConvertUnion.h:203:68: note: in instantiation of member function 'WebCore::JSToWrappedOverloader<WebCore::Text>::toWrapped' requested here auto castedValue = JSToWrappedOverloader<RawType>::toWrapped(lexicalGlobalObject, value); In file included from /src/webkit/WebKitBuild/Debug/DerivedSources/WebCore/unified-sources/UnifiedSource10.cpp:1: In file included from /src/webkit/WebKitBuild/Debug/DerivedSources/WebCore/JSHTMLFormElement.cpp:22: In file included from /src/webkit/WebKitBuild/Debug/DerivedSources/WebCore/JSHTMLFormElement.h:25: In file included from /src/webkit/WebKitBuild/Debug/DerivedSources/WebCore/JSHTMLElement.h:25: In file included from /src/webkit/WebKitBuild/Debug/DerivedSources/WebCore/JSElement.h:25: In file included from /src/webkit/WebKitBuild/Debug/DerivedSources/WebCore/JSNode.h:23: In file included from /src/webkit/Source/WebCore/bindings/js/JSDOMConvertDictionary.h:28: In file included from /src/webkit/Source/WebCore/bindings/IDLTypes.h:32: /src/webkit/WebKitBuild/Debug/usr/local/include/wtf/Brigand.h:1331:14: note: in instantiation of function template specialization 'brigand::for_each_args<(lambda at /src/webkit/Source/WebCore/bindings/js/JSDOMConvertUnion.h:195:50), brigand::type_<WebCore::IDLInterface<WebCore::Element>>, brigand::type_<WebCore::IDLInterface<WebCore::Text>>>' requested here return for_each_args( f, type_<Elements>()... ); /src/webkit/WebKitBuild/Debug/usr/local/include/wtf/Brigand.h:1336:20: note: in instantiation of function template specialization 'brigand::detail::for_each_impl<list, WebCore::IDLInterface<WebCore::Element>, WebCore::IDLInterface<WebCore::Text>, (lambda at /src/webkit/Source/WebCore/bindings/js/JSDOMConvertUnion.h:195:50)>' requested here return detail::for_each_impl( List{}, f ); In file included from /src/webkit/WebKitBuild/Debug/DerivedSources/WebCore/unified-sources/UnifiedSource10.cpp:1: In file included from /src/webkit/WebKitBuild/Debug/DerivedSources/WebCore/JSHTMLFormElement.cpp:41: /src/webkit/Source/WebCore/bindings/js/JSDOMConvertUnion.h:195:22: note: in instantiation of function template specialization 'brigand::for_each<brigand::list<WebCore::IDLInterface<WebCore::Element>, WebCore::IDLInterface<WebCore::Text>>, (lambda at /src/webkit/Source/WebCore/bindings/js/JSDOMConvertUnion.h:195:50)>' requested here brigand::for_each<InterfaceTypeList>([&](auto&& type) { In file included from /src/webkit/WebKitBuild/Debug/DerivedSources/WebCore/unified-sources/UnifiedSource10.cpp:41: In file included from /src/webkit/WebKitBuild/Debug/DerivedSources/WebCore/JSHTMLSlotElement.cpp:39: /src/webkit/Source/WebCore/bindings/js/JSDOMConvertVariadic.h:43:43: note: in instantiation of member function 'WebCore::Converter<WebCore::IDLUnion<WebCore::IDLInterface<WebCore::Element>, WebCore::IDLInterface<WebCore::Text>>>::convert' requested here auto result = Converter<IDLType>::convert(lexicalGlobalObject, value); /src/webkit/Source/WebCore/bindings/js/JSDOMConvertVariadic.h:63:50: note: in instantiation of member function 'WebCore::VariadicConverter<WebCore::IDLUnion<WebCore::IDLInterface<WebCore::Element>, WebCore::IDLInterface<WebCore::Text>>>::convert' requested here auto value = VariadicConverter<IDLType>::convert(lexicalGlobalObject, callFrame.uncheckedArgument(i)); In file included from /src/webkit/WebKitBuild/Debug/DerivedSources/WebCore/unified-sources/UnifiedSource10.cpp:41: /src/webkit/WebKitBuild/Debug/DerivedSources/WebCore/JSHTMLSlotElement.cpp:297:18: note: in instantiation of function template specialization 'WebCore::convertVariadicArguments<WebCore::IDLUnion<WebCore::IDLInterface<WebCore::Element>, WebCore::IDLInterface<WebCore::Text>>>' requested here auto nodes = convertVariadicArguments<IDLUnion<IDLInterface<Element>, IDLInterface<Text>>>(*lexicalGlobalObject, *callFrame, 0); 1 error generated. ``` To avoid this, we need generate `JSText::toWrapped()`.
Attachments
Add attachment
proposed patch, testcase, etc.
Tetsuharu Ohzeki [UTC+9]
Comment 1
2022-08-08 00:40:38 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/3099
EWS
Comment 2
2022-08-08 02:11:23 PDT
Committed
253202@main
(062294f6788f): <
https://commits.webkit.org/253202@main
> Reviewed commits have been landed. Closing PR #3099 and removing active labels.
Radar WebKit Bug Importer
Comment 3
2022-08-08 02:12:16 PDT
<
rdar://problem/98306039
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug