News for hackers. Stuff that matters.
Re:Non-Blocking Asynchronous JSON.parse Using the Fetch API by zamalek on Friday July 31, 2015 @08:03AM (#9981207)
> For each message to be sent to or received from a worker we need to convert it to a string.

Strange, according to MDN data sent to web workers needs only be deep clone-able[1]. Is this non-standard Gecko behavior?

> aMessage: This may be any value or JavaScript object handled by the structured clone algorithm, which includes cyclical references.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/Worker/post...

Re:Non-Blocking Asynchronous JSON.parse Using the Fetch API by jwmerrill on Friday July 31, 2015 @12:06PM (#9982535)
Using the structured clone algorithm for worker postMessage calls is standard:

https://html.spec.whatwg.org/multipage/workers.html#communic...

Re:Non-Blocking Asynchronous JSON.parse Using the Fetch API by msoad on Friday July 31, 2015 @02:03PM (#9983268)
It converts it to a string anyway.
Re:Non-Blocking Asynchronous JSON.parse Using the Fetch API by zamalek on Saturday August 01, 2015 @06:07AM (#9986525)
Gecko, at the very least, maintains cycles in the object graph. This is something that a naïve JSON round-trip can't do.