Re: Missing js::SharedArrayRawBufferRefs::~SharedArrayRawBufferRefs symbol in spidermonkey 68

Steve Fink <[email protected]> Tue, 9 Jun 2020 15:12:45 -0700
Newsgroups gmane.comp.mozilla.devel.jseng
Message-ID <[email protected]>
On 6/6/20 2:09 PM, [email protected] wrote:
> BTW, I would be satisfied just to understand how to move data between contexts. Using stringify it's too limiting (missing Map, Regex, etc..).

Just to be sure I understand what you mean by "move data between 
contexts": do you have multiple threads, each with their own runtime? 
These days, there's only one context and runtime per thread, so moving 
data between contexts is rare.

Structured clone preserves more information than stringify, but it is 
still very lossy -- it preserves neither an object's identity nor its 
prototype, for example. (Its semantics are defined in the HTML spec: 
https://html.spec.whatwg.org/multipage/structured-data.html#safe-passing-of-structured-data 
). I don't think we have any way to share data between runtimes that 
isn't some form of lossy serialization/deserialization.

js::SharedArrayRawBufferRefs is not marked JS_PUBLIC_API. It is a member 
of JSStructuredCloneData, which *is* marked JS_PUBLIC_API. It looks like 
an omission to me. I filed 
https://bugzilla.mozilla.org/show_bug.cgi?id=1644600