Bug 276665
Summary: | [Bindings] When generating a union of (callback, dict) we cannot convert from pointer-to-derived to pointer-to-base. | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ryan Reno <rreno> |
Component: | Bindings | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | cdumez, kiet.ho, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Ryan Reno
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
<rdar://problem/131851145>