Closed Bug 1777145 Opened 2 years ago Closed 2 years ago

Improve [Async]IterableIterator code

Categories

(Core :: DOM: Bindings (WebIDL), enhancement)

enhancement

Tracking

()

RESOLVED FIXED
107 Branch
Tracking Status
firefox107 --- fixed

People

(Reporter: shelly, Assigned: peterv, NeedInfo)

References

Details

Attachments

(5 files)

In Bug 1577383, we use a void* to indicate its data to be resolved asynchronously. If in any case it would just be a promise, it might be better to give it a type and store it directly.

Severity: -- → S3

In the streams spec the iterator has both a reader of type ReadableStreamDefaultReader and a boolean prevent cancel. https://streams.spec.whatwg.org/#rs-get-iterator

I'm going to reuse this bug to make various changes to the WebIDL iterable code, including how we store the data.

Assignee: nobody → peterv
Status: NEW → ASSIGNED
Type: defect → enhancement
Summary: Improve how AsyncIterableIterator stores its asynced data → Improve [Async]IterableIterator code

Depends on D156345

Pushed by pvanderbeken@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c714f3a35b11 Expose the Wrap function for WebIDL iterable iterators through a template argument instead of as a function pointer member. r=edgar https://hg.mozilla.org/integration/autoland/rev/f24853cacd7a Stop declaring IterableIteratorBase as derived from nsISupports. r=edgar https://hg.mozilla.org/integration/autoland/rev/a50fd5608d8d Iterable iterators don't need aGivenProto. r=edgar https://hg.mozilla.org/integration/autoland/rev/cf375034e2b8 Store the WebIDL iterable iterator's data directly in the iterator. r=edgar https://hg.mozilla.org/integration/autoland/rev/5727bc4895d2 Don't expose Wrap for WebIDL iterable iterator objects outside of binding code. r=edgar
Flags: needinfo?(peterv)
Pushed by pvanderbeken@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/86405d3c029c Expose the Wrap function for WebIDL iterable iterators through a template argument instead of as a function pointer member. r=edgar https://hg.mozilla.org/integration/autoland/rev/e3d5ebcfdc00 Stop declaring IterableIteratorBase as derived from nsISupports. r=edgar https://hg.mozilla.org/integration/autoland/rev/ce5e768ab88d Iterable iterators don't need aGivenProto. r=edgar https://hg.mozilla.org/integration/autoland/rev/7bea935c223b Store the WebIDL iterable iterator's data directly in the iterator. r=edgar https://hg.mozilla.org/integration/autoland/rev/3e30b1d53ea6 Don't expose Wrap for WebIDL iterable iterator objects outside of binding code. r=edgar
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: