diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-06-20 09:04:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-20 09:04:34 -0700 |
commit | f2c50fae844b34cf6d8488ab1fbc599eb935a919 (patch) | |
tree | 14bbf737b249afa2f82f86bea67d17d8f624484a /core/libdeno/api.cc | |
parent | 6a5177dc11936687e6da95c3c45e3e41a7856d79 (diff) |
Fix silent failure of WebAssembly.instantiate() (#2548)
By making WASM compilation synchronous. We'll have to do more work to
make it properly async.
Diffstat (limited to 'core/libdeno/api.cc')
-rw-r--r-- | core/libdeno/api.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/libdeno/api.cc b/core/libdeno/api.cc index 8a3a56156..13057aeae 100644 --- a/core/libdeno/api.cc +++ b/core/libdeno/api.cc @@ -117,6 +117,13 @@ void deno_init() { platform = v8::platform::NewDefaultPlatform(); v8::V8::InitializePlatform(platform.get()); v8::V8::Initialize(); + // TODO(ry) This makes WASM compile synchronously. Eventually we should + // remove this to make it work asynchronously too. But that requires getting + // PumpMessageLoop and RunMicrotasks setup correctly. + // See https://github.com/denoland/deno/issues/2544 + const char* argv[2] = {"", "--no-wasm-async-compilation"}; + int argc = 2; + v8::V8::SetFlagsFromCommandLine(&argc, const_cast<char**>(argv), false); } } |