WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
276665
[Bindings] When generating a union of (callback, dict) we cannot convert from pointer-to-derived to pointer-to-base.
https://bugs.webkit.org/show_bug.cgi?id=276665
Summary
[Bindings] When generating a union of (callback, dict) we cannot convert from...
Ryan Reno
Reported
2024-07-16 10:21:15 PDT
IDL like this: typedef (MyCallback, MyDict) MyUnion; interface MyInterface { undefined myFunction(optional MyUnion = {}) } Will generate a function body for myFunction which will have as a conversion result for the argument an optional<variant<RefPtr<JSMyCallback>, MyDict>>. Which means that we *must* use a RefPtr to the derived JSWrapper class in WebCore rather than the base Wrapped class. This is because C++ won't let us convert from variant<Derived*, ...> to variant<Base*, ...> as they are distinct types. There must be some way to either coax the C++ compiler to do what we mean or to modify the code generator to output the variant<Base*, ...> type as the result of the conversion.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-07-16 10:23:25 PDT
<
rdar://problem/131851145
>
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