-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Polyfill for Promise might breaks wasm on edge #815
Comments
That looks like a bug in WebAssembly.instantiateStreaming and not in the Promise polyfill. It looks like you need to polyfill WebAssembly.instantiateStreaming; in browsers which don't support it receiving a Promise. |
But before |
I found this comment about Edge and core-js Promise #579 (comment) |
Thanks for related link. I'm not a expert at js but I think it is definitely a bug in core-js: it fakes Promise but not be compatible with built-in APIs. What's worse it wraps |
@clouds56 in case with strict type checking we can't do anything else like hack that you provide in first message. See #178 (comment) and the whole issue. |
…ming on non-chromium Edge (zloirock/core-js#815)
At this moment, in case of polyfilled nativePromiseBasedAPI(); // -> it's a native, not `core-js`, promise, but:
nativePromiseBasedAPI() instanceof Promise; // -> true
nativePromiseBasedAPI().constructor === Promise; // -> true
nativePromiseBasedAPI().then(fn); // -> it's a `core-js` promise
nativePromiseBasedAPI().catch(fn); // -> it's a `core-js` promise
nativePromiseBasedAPI().finally(fn); // -> it's a `core-js` promise and that fixes most possible related problems. But we can't patch all possible native promise-based APIs to make them return or accept (the case of this issue) |
BTW your problem case most likely will work in the actual |
We might fix for
WebAssembly.instantiateStreaming
.See also webpack/webpack#10560
The text was updated successfully, but these errors were encountered: