You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In browsers, sending large array buffers over postMessage, for example to a Worker, can be optimized by indicating that an ArrayBuffer (which is Transferable) should transfer ownership, instead of being cloned. See the transfer parameter to postMessage on MDN.
This does not appear to be working in Deno 1.12.2: const tmp = new Uint8Array(0); w.postMessage({ tmp }, [ tmp.buffer ]); throws DOMException: Value not transferable - yet const tmp = new Uint8Array(0); w.postMessage({ tmp }, [ ]); succeeds.
There is a related issue #8341, but it's far more broad - this issue is requesting only ArrayBuffer support, which is part of the spec all browsers implement.
The text was updated successfully, but these errors were encountered:
I don't think it is a duplicate of #8341. This issue is specific to ArrayBuffer, while the #8341 talks about general resources (Deno.Conn for example). I am going to work on this once I am back from vacation. It is definitely a duplicate of #11303 though :-)
In browsers, sending large array buffers over postMessage, for example to a Worker, can be optimized by indicating that an ArrayBuffer (which is Transferable) should transfer ownership, instead of being cloned. See the transfer parameter to postMessage on MDN.
This does not appear to be working in Deno 1.12.2:
const tmp = new Uint8Array(0); w.postMessage({ tmp }, [ tmp.buffer ]);
throwsDOMException: Value not transferable
- yetconst tmp = new Uint8Array(0); w.postMessage({ tmp }, [ ]);
succeeds.There is a related issue #8341, but it's far more broad - this issue is requesting only ArrayBuffer support, which is part of the spec all browsers implement.
The text was updated successfully, but these errors were encountered: