Re: [heycam/webidl] Idea for [AllowShared] (handling SharedArrayBuffer safely) (#638)

Maybe silly question but: while obviously `any` and `object` can receive SABs and views on SABs, the race hazard is only present if the method then proceeds to use that `any`/`object` value *as a view* to racily read the SAB's contents.  E.g., if the value is just stored to hand back to content as a callback argument, that'd be fine.  But are methods that are using their arguments as views *really* using `any`/`object` instead of an explicit `BufferSource` (possibly as one disjunct of an `or`)?

Note also that for the `any` used by `postMessage()`, it's not though to just look at the `any` value, but all the transitively-reached objects during structured serialization, so this is not a case that Web IDL could help.  I wonder if perhaps all the interesting other cases of using `any` similarly require ad hoc checks in the method spec.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/638#issuecomment-460704481

Received on Tuesday, 5 February 2019 16:28:24 UTC