@@ -65,7 +65,7 @@ addToLibrary({
65
65
chunks : [ wholeFileData ] ,
66
66
chunkSize : wholeFileData . byteLength
67
67
} ;
68
- return Promise . resolve ( ) ;
68
+ return ;
69
69
}
70
70
}
71
71
var firstChunk = ( offset / chunkSize ) | 0 ;
@@ -84,7 +84,7 @@ addToLibrary({
84
84
if ( allPresent ) {
85
85
// The data is already here, so nothing to do before we continue on to
86
86
// the actual read.
87
- return Promise . resolve ( ) ;
87
+ return ;
88
88
}
89
89
// This is the first time we want the chunks' data. We'll make
90
90
// one request for all the chunks we need, rather than one
@@ -100,20 +100,15 @@ addToLibrary({
100
100
for ( i = firstChunk ; i <= lastChunk ; i ++ ) {
101
101
wasmFS$JSMemoryRanges [ file ] . chunks [ i ] = bytes . slice ( i * chunkSize - start , ( i + 1 ) * chunkSize - start ) ;
102
102
}
103
- return Promise . resolve ( ) ;
104
103
}
105
104
106
105
wasmFS$backends [ backend ] = {
107
106
// alloc/free operations are not actually async. Just forward to the
108
107
// parent class, but we must return a Promise as the caller expects.
109
- allocFile : async ( file ) => {
110
- // nop
111
- return Promise . resolve ( ) ;
112
- } ,
108
+ allocFile : async ( file ) => { /* nop */ } ,
113
109
freeFile : async ( file ) => {
114
110
// free memory
115
111
wasmFS$JSMemoryRanges [ file ] = undefined ;
116
- return Promise . resolve ( ) ;
117
112
} ,
118
113
119
114
write : async ( file , buffer , length , offset ) => {
0 commit comments