Closed tlively closed 1 month ago
cc @eqrion and @syg for comments as well.
Thank you both for the review. I've addressed all the feedback. I'll also add this as an agenda item for the next subgroup meeting.
The text here already includes "... assuming that browser GCs can support such an exception (see the discussion in the FAQ below)" so I think it's sufficiently clear that this is not set in stone and depends on architectural constraints from browsers.
Talked to @eqrion: he has opinions on this but is on leave for a few more weeks. Why don't we leave it open until he gets back?
(sorry for the delay, just got back). My comment was only just ensuring that this is suitably marked as depending on browsers supporting shared-to-unshared references, which is an open question at this point. It looks like that's marked out well enough, so I think this can be merged.
Thanks, @eqrion! @abrown, want to flip the approve bit?
As discussed in #30 and #37, add a JS API that allows arbitrary objects to be wrapped and converted to shared externrefs with dynamic checks ensuring the wrapped object is only ever observed on the original thread. Refer to the existing FAQ entry for discussion on how the lifetimes of the wrapper and wrapped object might interact.
Resolves #37.