Skip to content

Commit

Permalink
update wasm initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjipeng committed Nov 17, 2023
1 parent 43653a6 commit e968abb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wasm/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -1503,9 +1503,9 @@ export default class Picasso {
_init() {
return fetch("picasso.wasm")
.then((response) => response.arrayBuffer())
.then((binary) => {
let module = new WebAssembly.Module(binary);
this._instance = new WebAssembly.Instance(module, info);
.then((binary) => WebAssembly.instantiate(binary, info))
.then((result) => {
this._instance = result.instance;
this._setEnv(this._instance);
this._setupFuncs(this._instance);
});
Expand Down

0 comments on commit e968abb

Please sign in to comment.