W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > March 2022

Re: [mediacapture-region] Refer to getBoundingClientRect as a defintion of the actual crop area (#32)

From: youennf via GitHub <sysbot+gh@w3.org>
Date: Tue, 29 Mar 2022 13:31:53 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-1081877030-1648560712-sysbot+gh@w3.org>
> Could you point out an example of a Transferable/Serializable object that stores a weak reference to an Element in the original context, and where the weak reference gets replicated in the new context?

MessagePort is pretty close to that model, please have a look.
A MessagePort A has a related MessagePort B to which it sends messages.
When transferring A, a reference to its MessagePort B needs to be as a slot of a DataHolder.
Then when recreating A, the new MessagePort A' will set its MessagePort B from the DataHolder structure.

The spec wording is not using weak reference which I think is fine.
Initially I was not using weak reference here (the GC note was sufficient to me) but adding it makes things a tad clearer I think.
If Chrome is implementing this with UUIDs as the weak reference tool, this is perfectly fine.

GitHub Notification of comment by youennf
Please view or discuss this issue at https://github.com/w3c/mediacapture-region/pull/32#issuecomment-1081877030 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 29 March 2022 13:31:55 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:56 UTC