Generate a initializer method for unions
Categories
(Core :: DOM: Bindings (WebIDL), enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox107 | --- | fixed |
People
(Reporter: saschanaz, Assigned: edgar)
References
Details
Attachments
(3 files, 8 external files, 4 obsolete files)
|
13.46 KB,
patch
|
Details | Diff | Splinter Review | |
|
2.57 MB,
patch
|
Details | Diff | Splinter Review | |
|
1.29 MB,
patch
|
Details | Diff | Splinter Review |
https://phabricator.services.mozilla.com/D153782 had to handcraft its own function to try reading a JS::Value as BufferSource. This feature ideally should be provided by bindings layer so that any change in the layer won't break this function.
Comment 1•4 years ago
|
||
I think it would be nice if the codegen moved the generated code that calls the various TryToSet* methods to a single TryToSet or Init method for all union types so anyone that needs to use the same overload logic outside the binding layer doesn't have to reinvent the wheel. We do something similar for the Init methods of dictionary types, so it might make more sense to call it Init for consistency.
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 2•4 years ago
|
||
This also benefits bug 1712122 which will converts a js object from resolved promise into OwningStringOrBlob.
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 3•4 years ago
|
||
| Assignee | ||
Comment 4•4 years ago
|
||
Depends on D156175
| Assignee | ||
Comment 5•4 years ago
|
||
| Assignee | ||
Comment 6•4 years ago
|
||
Depends on D156176
| Assignee | ||
Comment 7•4 years ago
|
||
Depends on D156189
| Assignee | ||
Comment 8•4 years ago
|
||
Depends on D156195
| Assignee | ||
Comment 9•4 years ago
|
||
Depends on D156196
| Assignee | ||
Comment 10•4 years ago
|
||
| Assignee | ||
Comment 11•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
| Assignee | ||
Comment 13•4 years ago
|
||
Remove the conditional Rooter member in the union conversion structure and switch
the regular union structure to use Rooted for Record and Sequence that contains
js object (like what we do for Dictionary type). Codegen introudces a new type on
isMember in getJSToNativeConversionInfo() as we need to generate different conversion
code for Sequence and Record if they are union member which now use Rooted* instead
of *Rooter to root js object.
Depends on D156175
| Assignee | ||
Comment 14•4 years ago
|
||
TrySetTo* conversion methods are generated in the regular union structure now.
Depends on D157326
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
| Assignee | ||
Comment 15•4 years ago
|
||
| Assignee | ||
Comment 16•4 years ago
|
||
| Assignee | ||
Comment 17•4 years ago
|
||
Updated•4 years ago
|
| Assignee | ||
Comment 18•4 years ago
|
||
| Assignee | ||
Comment 19•4 years ago
|
||
| Assignee | ||
Comment 20•4 years ago
|
||
Comment 21•4 years ago
|
||
Comment 22•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/2e1bb7717cf1
https://hg.mozilla.org/mozilla-central/rev/d49d2ab5f276
https://hg.mozilla.org/mozilla-central/rev/48e614c747f4
https://hg.mozilla.org/mozilla-central/rev/93aa22adf984
https://hg.mozilla.org/mozilla-central/rev/b9d71890967f
https://hg.mozilla.org/mozilla-central/rev/8b3214f5f45c
https://hg.mozilla.org/mozilla-central/rev/feede7ecc36f
https://hg.mozilla.org/mozilla-central/rev/1a25e73e25c6
Description
•