Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc/wasm: make wasm_exec more robust against uncommon environments
JavaScript environments are quite unpredictable because bundlers add mocks for compatibility and libraries can polute the global namespace. Detect more of such situations: - Add check that require("fs") returns an object. - Fix check that require("fs") returns an non-empty object. - Add check that "module" is defined. Fixes golang#40730 Change-Id: I2ce65fc7db64bbbb0b60eec79a4cfe5c3fec99c0 Reviewed-on: https://go-review.googlesource.com/c/go/+/248758 Run-TryBot: Richard Musiol <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
- Loading branch information