Skip to content

Commit

Permalink
dont add run dep in a pthread
Browse files Browse the repository at this point in the history
  • Loading branch information
dschuff committed Nov 15, 2017
1 parent 3791916 commit 9d97628
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/preamble.js
Original file line number Diff line number Diff line change
Expand Up @@ -2283,10 +2283,13 @@ function integrateWasmJS() {
// Keep a reference to the compiled module so we can post it to the workers.
Module['wasmModule'] = module;
#endif
removeRunDependency('wasm-instantiate');
if(!ENVIRONMENT_IS_PTHREAD) {
removeRunDependency('wasm-instantiate');
}
}
if (!ENVIRONMENT_IS_PTHREAD) {
addRunDependency('wasm-instantiate'); // we can't run yet (except in a pthread, where we have a custom sync instantiator)
}

addRunDependency('wasm-instantiate'); // we can't run yet

// User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback
// to manually instantiate the Wasm module themselves. This allows pages to run the instantiation parallel
Expand Down

0 comments on commit 9d97628

Please sign in to comment.