Skip to content

Commit 0086fa3

Browse files
authored
[file_packager] Pass module object to runWithFS (#22086)
This makes it robust against #21775 in case we try to re-land it. callRuntimeCallbacks passes the actual Module, so use it.
1 parent 77f9840 commit 0086fa3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/file_packager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,12 +1094,12 @@ def generate_js(data_target, data_files, metadata):
10941094
}\n'''
10951095

10961096
ret += '''
1097-
function runWithFS() {\n'''
1097+
function runWithFS(Module) {\n'''
10981098
ret += code
10991099
ret += '''
11001100
}
11011101
if (Module['calledRun']) {
1102-
runWithFS();
1102+
runWithFS(Module);
11031103
} else {
11041104
if (!Module['preRun']) Module['preRun'] = [];
11051105
Module["preRun"].push(runWithFS); // FS is not initialized yet, wait for it

0 commit comments

Comments
 (0)