Closed Bug 1129904 Opened 10 years ago Closed 6 years ago

Implement PortCollection

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: baku, Assigned: baku)

References

()

Details

Attachments

(1 file)

This is a low low priority API related to MessagePort/MessageChannel. I had this code on my laptop and I guess would be nice to land it.
It already supports workers, but we cannot enable it until MessagePort/MessageChannel on workers is not landed.
Attachment #8559767 - Flags: review?(bugs)
Comment on attachment 8559767 [details] [diff] [review]
portcollection.patch

Why does this use "iterate" instead of, say, forEach?  Or just having an ES6 iterator?
Flags: needinfo?(amarchesini)
Good point. Probably we should file a bug for the spec. I'll ping annevk.
Btw, we don't have iterable<> support in WebIDL yet, right?
Flags: needinfo?(amarchesini)
https://html.spec.whatwg.org/multipage/comms.html#broadcasting-to-many-ports

"The API described in this section is controversial, as, in an attempt to solve an architectural memory leak, it instead exposes the details of Garbage Collection. This is a lose-lose scenario. A better solution is really needed here."
Comment on attachment 8559767 [details] [diff] [review]
portcollection.patch

So I think we should not implement PortCollection as it is defined currently.
Attachment #8559767 - Flags: review?(bugs) → review-
> Btw, we don't have iterable<> support in WebIDL yet, right?

No, but we should add it.
PortCollection has been removed by the spec.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: