tc39 / proposal-shadowrealm

ECMAScript Proposal, specs, and reference implementation for Realms
https://tc39.es/proposal-shadowrealm/
1.41k stars 67 forks source link

ShadowRealms WPT Problems #397

Open mgaudet opened 5 months ago

mgaudet commented 5 months ago

Here are some issues I've seen in the ShadowRealms WPT that -might- be implementation specific, but I'd be curious about feedback from other implementations running tests:

caridy commented 5 months ago

/cc @rwaldron

rwaldron commented 5 months ago

The failures around undefined references are caused by those external script resources not being loaded into the ShadowRealm created for the test. That's not an "issue" with ShadowRealms or testing of ShadowRealms, it's just a bug in the test harness that needs to be fixed.

rwaldron commented 5 months ago

The reason assert_Memory is undefined is because it needs to be set as globalThis.assert_Memory = ... in wasm/jsapi/memory/assertions.js

rwaldron commented 5 months ago

As for the encoding back pressure issues, I can't say why that doesn't work—it looks like the outcomes are out of order? There's nothing about ShadowRealm itself that would cause that. I wanted to try running that test in either of the other implementations, but couldn't get my local runner to pick up the /encoding/streams/backpressure.any.shadowrealm.html test, even though it is definitely in the manifest 🤷