Bug 243655
Summary: | Add `JSGenerateToNativeObject` attributes to `Text` | ||
---|---|---|---|
Product: | WebKit | Reporter: | Tetsuharu Ohzeki [UTC+9] <tetsuharu.ohzeki> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 218692 |
Tetsuharu Ohzeki [UTC+9]
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]
Pull request: https://github.com/WebKit/WebKit/pull/3099
EWS
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
<rdar://problem/98306039>