You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Chrome, we're implementing the 2 streaming APIs in v8, on the WebAssembly object (as per spec), and inject the actual implementation from Chrome. This is for layering reasons. I'm assuming we're not alone in taking this approach.
What do we want to do if the embedder "forgets" to inject a dependency? This scenario is unlikely, but may happen in non-web embeddings. A developer porting code to node.js, for example, may hit this situation.
Options:
quietly return undefined (weird, no indication of what just happened)
throw RangeError (we did that for browser limits for sync compilation, but it is weird because why "Range" in this case?)
throw Error with a nice description
behave as-if the API didn't exist (that'd be weird, because the API is testably present)
crash (this is also weird, why such drastic measures when calling an API)