tc39 / proposal-ecmascript-sharedmem

Shared memory and atomics for ECMAscript
Mozilla Public License 2.0
375 stars 32 forks source link

Companion spec for DOM/HTML changes #139

Closed lars-t-hansen closed 7 years ago

lars-t-hansen commented 8 years ago

@binji, @domenic, @annevk, @juj

We need to write up the changes that we need to DOM and/or HTML so that we have a canonical reference for what browsers need to support. Aids interoperation.

Evolving spec in the dom/ directory, formatted copy here: https://tc39.github.io/ecmascript_sharedmem/dom_shmem.html

annevk commented 8 years ago

https://tc39.github.io/ecmascript_sharedmem/dom_shmem.html#clusters.creation is incorrect. The HTML Standard runs the "run a worker" steps in parallel with the main thread. So the worker is not necessarily immediately created. (It would also help if your text named or linked the algorithms in question.)

From talking to @bakulf what Firefox does in practice with several objects, including SharedArrayBuffer, is to just not support them for MessagePort/MessageChannel and instead special case Worker to not use MessageChannel underneath. I'm not sure what other browsers do here.

(Note also that such a model might be problematic if going forward certain <iframe>s run in a different process as that would affect whether certain objects can be shared with them.)

annevk commented 7 years ago

I think this is fixed now since we have updated HTML. Unless you want to have an issue for tracking new features in HTML that might be needed here as well, but maybe that's better done as a new dedicated issue for that purpose.

lars-t-hansen commented 7 years ago

Agreed.