File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -871,13 +871,14 @@ var LibraryDylink = {
871
871
}
872
872
873
873
if ( flags . loadAsync ) {
874
- if ( binary instanceof WebAssembly . Module ) {
875
- var instance = new WebAssembly . Instance ( binary , info ) ;
876
- return Promise . resolve ( postInstantiation ( binary , instance ) ) ;
877
- }
878
- return WebAssembly . instantiate ( binary , info ) . then (
879
- ( result ) => postInstantiation ( result . module , result . instance )
880
- ) ;
874
+ return ( async function ( ) {
875
+ if ( binary instanceof WebAssembly . Module ) {
876
+ var instance = new WebAssembly . Instance ( binary , info ) ;
877
+ return postInstantiation ( binary , instance ) ;
878
+ }
879
+ const result = await WebAssembly . instantiate ( binary , info ) ;
880
+ return postInstantiation ( result . module , result . instance ) ;
881
+ } ) ( ) ;
881
882
}
882
883
883
884
var module = binary instanceof WebAssembly . Module ? binary : new WebAssembly . Module ( binary ) ;
You can’t perform that action at this time.
0 commit comments