Skip to content

Commit d429da3

Browse files
authored
[WasmFS] Fix MINIMAL_RUNTIME deps. Browser is not allowed there (#16138)
1 parent af6dc09 commit d429da3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ jobs:
384384
- run-tests:
385385
# also add a little select testing for wasm2js in -O3
386386
# also add a little select wasmfs testing
387-
test_targets: "core3 wasm2js3.test_memorygrowth_2 wasmfs.test_hello_world wasmfs.test_hello_world_standalone wasmfs.test_unistd_links* wasmfs.test_atexit_standalone wasmfs.test_emscripten_get_now"
387+
test_targets: "core3 wasm2js3.test_memorygrowth_2 wasmfs.test_hello_world wasmfs.test_hello_world_standalone wasmfs.test_unistd_links* wasmfs.test_atexit_standalone wasmfs.test_emscripten_get_now wasmfs.test_dyncall_specific_minimal_runtime"
388388
test-wasm2js1:
389389
executor: bionic
390390
steps:

src/library_wasmfs.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ var WasmfsLibrary = {
99
'$wasmFS$JSMemoryFiles',
1010
'$wasmFS$JSMemoryFreeList',
1111
'$asyncLoad',
12+
#if !MINIMAL_RUNTIME
1213
// TODO: when preload-plugins are not used, we do not need this.
1314
'$Browser',
15+
#endif
1416
],
1517
$FS : {
1618
// TODO: Clean up the following functions - currently copied from library_fs.js directly.
@@ -27,12 +29,14 @@ var WasmfsLibrary = {
2729
if (onload) onload();
2830
removeRunDependency(dep);
2931
}
32+
#if !MINIMAL_RUNTIME
3033
if (Browser.handledByPreloadPlugin(byteArray, fullname, finish, () => {
3134
if (onerror) onerror();
3235
removeRunDependency(dep);
3336
})) {
3437
return;
3538
}
39+
#endif
3640
finish(byteArray);
3741
}
3842
addRunDependency(dep);

0 commit comments

Comments
 (0)