muraki...@chromium.org, my...@chromium.org, rak...@chromium.org
https://github.com/fergald/explainer-messageport-close
https://github.com/whatwg/html/pull/9933
https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y
Notifies one of the MessagePorts that the other port has been disentangled (i.e., close() is called, an owning document is destroyed, or the port is garbage collected).
Channel Messaging API enables two separate scripts running in different browsing contexts to communicate directly. Once MessageChannel is created, we can access two entangled MessagePorts (MessageChannel.port1 and MessageChannel.port2), transfer port2 to the other browsing context, allowing these two scripts to post and receive messages.
The problem with this API is that there is currently no timely and reliable way to detect when a MessagePort becomes disentangled. This makes it difficult to release resources associated with ports. Some users have used the unload event to detect disconnection, but it is unreliable especially on mobile. Therefore, the approach available now is to hold a MessagePort in WeakRef and periodically check if this port has been garbage collected by using deref() or to make use of the pagehide event. However, this event is also not an effective solution. The reasons are as follows:
1) It doesn't work when the document crashes.
2) The port must cooperate in signaling the port is going to be disentangled.(i.e., the port must post the message which is "it is going to be closed" to the entangled port.)
3) It fires even if the page is not being destroyed and just enters BFCache.
Adding a close event helps to detect timely and reliably that MessagePort is disentangled and make it easier to release resources associated with ports.
https://github.com/whatwg/html/issues/1766#issuecomment-1708027883
Not needed because This is a small feature where we just dispatch a new event.
None
Gecko: Positive (https://github.com/mozilla/standards-positions/issues/914)
Mozilla people are already involved in the initial Github issue.
WebKit: No response (https://github.com/WebKit/standards-positions/issues/271)
WebKit people are already involved in the initial Github issue.
Web developers: Positive (https://github.com/whatwg/html/issues/1766)
Other signals:
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
None
Yes.
https://chromium-review.googlesource.com/c/chromium/src/+/5003089
None
None
This is a small feature (just dispatching a new event) that doesn’t need experimentation.
False
https://bugs.chromium.org/p/chromium/issues/detail?id=1495616
No milestones specified
https://chromestatus.com/feature/5086799659794432
This intent message was generated by Chrome Platform Status.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAA66OT2mWU9WJnkVzD2gm_%2Bk%2Bewag5Lhq_K39Vo9WGdtGW79cQ%40mail.gmail.com.
Risks
Interoperability and Compatibility
None
Gecko: Positive (https://github.com/mozilla/standards-positions/issues/914)
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAEV-rjcZL5YnizhWf0xA%3DBaSt4EmY32p1tjhYG%3DfEOP1B-Kk%2BQ%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAA66OT2mWU9WJnkVzD2gm_%2Bk%2Bewag5Lhq_K39Vo9WGdtGW79cQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
On 11/30/23 10:56 PM, Fergal Daly wrote:
On Wednesday, November 29, 2023 at 2:23:12 PM UTC+9 Yoav Weiss wrote:
On Tue, 28 Nov 2023 at 12:31, Nonoka Muraki <muraki...@chromium.org> wrote:
TAG reviewNot needed because This is a small feature where we just dispatch a new event.
Unfortunately that's not a criteria for skipping a TAG review. Can you file one?
I'm concerned by this because every TAG review I've seen in the last couple of years has taken months to get a response. If our own privacy review is positive and we have agreement with other vendors would we block on the TAG review?
Gentle reminder to request approvals for the other review gates
in chromestatus, thanks.
Thanks Rakina - right now the biggest blocker is the unlanded
spec PR. Things should move pretty quickly once that's resolved.
LGTM2
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/28299184-c2d1-4000-be13-f7489a5a242b%40chromium.org.