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

> So I was thinking, perhaps we keep [AllowShared], but also require it for `any` and `object`, and make it branch on the encompassing agent's agent cluster's [[AllowHighResolutionTimers]]. And then [UnsafeAllowShared] would not.

I'm a little nervous about this idea. In my limited experience writing specifications with WebIDL, I've already felt the need to use `any` or `object` as an escape hatch, to get around the conversions and checks that would otherwise take place.

The JS standard library in particular has many places where values are simply being passed around, and not interpreted. It seems excessively conservative to ask authors to place an extended attribute for such an "uninterpreted value" case.

I wonder if there's some other spec convention we could use, where we're somehow checking for safety at the point of use, rather than the point of taking something in as a parameter.

-- 
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-460704292

Received on Tuesday, 5 February 2019 16:27:55 UTC