Created attachment 455893 [details] reproduction with visible console and Safari version Example repro: https://github.com/jrvidal/message-port-repro/tree/master/clone Working deployment: https://sab-clone.herokuapp.com/ When sending a message containing a `SharedArrayBuffer`, the receiving end sometimes receives a regular, deep copied `ArrayBuffer` instead of a proper clone pointing to the same bytes. In the example provided, it can be consistently reproduced when posting a message through a `MessagePort` or a `BroadcastChannel`.
<rdar://problem/90919367>
All browsers result: *** Safari 16 on macOS 12.6 *** from worker - SharedArrayBuffer (length 10) from broadcast - ArrayBuffer (length 10) from port - ArrayBuffer (length 10) *** Safari Technology Preview 153 *** from worker - SharedArrayBuffer (length 10) from broadcast - ArrayBuffer (length 10) from port - ArrayBuffer (length 10) *** Chrome Canary 107 *** from worker - SharedArrayBuffer (length 10) from broadcast - null from port - SharedArrayBuffer (length 10) *** Firefox Nightly 106 *** Did not get anything in Console _______ Just wanted to share updated status. Thanks!
I've just tested this again in Safari Technology Preview and this seems to be fixed. from worker - SharedArrayBuffer (length 10) from broadcast - SharedArrayBuffer (length 10) from port - SharedArrayBuffer (length 10) However, it's weird that Safari sends the SAB over a broadcast channel while Chrome receives `null`. So maybe that's still a bug.
(In reply to Sam Verschueren from comment #3) > I've just tested this again in Safari Technology Preview and this seems to > be fixed. > > from worker - SharedArrayBuffer (length 10) > from broadcast - SharedArrayBuffer (length 10) > from port - SharedArrayBuffer (length 10) > > However, it's weird that Safari sends the SAB over a broadcast channel while > Chrome receives `null`. So maybe that's still a bug. Isn't it a Chrome bug? CC @Chris.
Yes this might be on Chrome actually. In Firefox itβs also a SharedArrayBuffer. Not sure what the spec says about it, but my assumption is that it should be a SAB instead of null.