Closed Bug 845666 Opened 8 years ago Closed 8 years ago

Support sequences of sequences in WebIDL bindings

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We actually have consumers that want this now.
Comment on attachment 718829 [details] [diff] [review]
Add support for sequences containing other sequences (or dictionaries containing sequences) to WebIDL.   keeps simple sequence arguments and variadics using an auto array, while everything else uses a non-auto array.

Review of attachment 718829 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/bindings/Codegen.py
@@ +2312,5 @@
> +        # hence will end up with pointers to bogus memory, which is bad.  To
> +        # deal with this, we typically map WebIDL sequences to our Sequence
> +        # type, which is in fact memmovable.  The one exception is when we're
> +        # passing in a sequence directly as an argument without any sort of
> +        # optional or nullable complexity going on.  In that situation, we can

Can you document that we don't use AutoSequence for optional or nullable because we don't want it to leak out of the binding code (which Nullable<AutoSequence> or Optional<AutoSequence> would cause).
Attachment #718829 - Flags: review?(peterv) → review+
Added comments and pushed https://hg.mozilla.org/integration/mozilla-inbound/rev/2f35f1c8d0f9
Flags: in-testsuite+
Target Milestone: --- → mozilla22
https://hg.mozilla.org/mozilla-central/rev/2f35f1c8d0f9
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.