04:22 | <annevk> | shu: you might wanna look at the PR first, it's using isView to distinguish AB and SAB |
04:41 | <shu> | annevk: oh i see, interesting |
04:44 | <shu> | it seems like an unfortunate way to test SABness but i don’t think there’re any plans to add isView to SAB |
04:45 | <annevk> | shu: this is all fallout from that hiding you all proposed that I'm dealing with... |
04:46 | <annevk> | oh my bad, shu, I meant to link https://github.com/web-platform-tests/wpt/pull/23112 |
05:36 | <shu> | annevk: well, i’m not particularly happy about the price we pay for spectre either, but i’m willing to live with some oddness in wpt. in this case cross realm brand checks is a general JS issue though, how does it deal with other constructors where e.g. no Array.isArray is available? |
05:43 | <annevk> | shu: this isn't about cross-realm |
05:47 | <shu> | annevk: ah, i'm sorry i misunderstood, it's because SAB isn't available for the equality check? |
05:48 | <annevk> | shu: yeah, it wants to check that what Wasm returns is actually a SAB |
05:48 | <annevk> | well the Wasm.Memory API |
05:48 | <annevk> | WebAssembly.Memory, sigh |
05:49 | <shu> | annevk: i'd think checking @@toStringTag is a more direct check |
05:50 | <Bakkot> | or `.constructor.name` or whatever |
05:51 | <shu> | will catch up tomorrow morning, sleep time now |
06:00 | <rkirsling> | wow, what a healthy bedtime |
06:01 | <devsnek> | 🛏️ |
06:11 | <ljharb> | why would toStringTag or the mutable contructor property's mutable name property be a more direct check? |
06:11 | <ljharb> | if you want it to *claim* to be an SAB, sure, but not if you want it to actually be one - that requires checking for the presence of internal slots. |
06:15 | <Bakkot> | generally platform tests exist to help cooperating implementations, not maximize the chances of tripping up an adversarial one |
06:42 | <ljharb> | ah, fair, i suppose it's not important in tests |