Skip to content

Commit e40e997

Browse files
committed
Fixed config issue
1 parent 0416c34 commit e40e997

File tree

9 files changed

+10
-10
lines changed

9 files changed

+10
-10
lines changed

src/mono/sample/mbr/browser/runtime.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var Module = {
55
config: null,
66

77
preInit: async function() {
8-
Module.config = await MONO.mono_wasm_load_config("./mono-config.json");
8+
await MONO.mono_wasm_load_config("./mono-config.json"); // sets Module.config implicitly
99
},
1010

1111
// Called when the runtime is initialized and wasm is ready

src/mono/sample/wasm/browser-bench/runtime.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var Module = {
44
config: null,
55

66
preInit: async function() {
7-
Module.config = await MONO.mono_wasm_load_config("./mono-config.json");
7+
await MONO.mono_wasm_load_config("./mono-config.json"); // sets Module.config implicitly
88
},
99

1010
// Called when the runtime is initialized and wasm is ready

src/mono/sample/wasm/browser-profile/runtime.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var Module = {
55
config: null,
66

77
preInit: async function() {
8-
Module.config = await MONO.mono_wasm_load_config("./mono-config.json");
8+
await MONO.mono_wasm_load_config("./mono-config.json"); // sets Module.config implicitly
99
},
1010

1111
// Called when the runtime is initialized and wasm is ready

src/mono/sample/wasm/browser/runtime.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var Module = {
66
config: null,
77

88
preInit: async function() {
9-
Module.config = await MONO.mono_wasm_load_config("./mono-config.json");
9+
await MONO.mono_wasm_load_config("./mono-config.json"); // sets Module.config implicitly
1010
},
1111

1212
// Called when the runtime is initialized and wasm is ready

src/mono/wasm/debugger/tests/debugger-test/runtime-debugger.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var Module = {
55
config: null,
66

77
preInit: async function() {
8-
Module.config = await MONO.mono_wasm_load_config("./mono-config.json");
8+
await MONO.mono_wasm_load_config("./mono-config.json"); // sets Module.config implicitly
99
},
1010

1111
// Called when the runtime is initialized and wasm is ready

src/mono/wasm/runtime-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ var Module = {
211211
printErr,
212212

213213
preInit: async function() {
214-
Module.config = await MONO.mono_wasm_load_config("./mono-config.json");
214+
await MONO.mono_wasm_load_config("./mono-config.json"); // sets Module.config implicitly
215215
},
216216

217217
onAbort: function(x) {

src/mono/wasm/runtime/library_mono.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2384,9 +2384,9 @@ var MonoSupportLib = {
23842384
} else { // shell or worker
23852385
config = JSON.parse(read(configFilePath)); // read is a v8 debugger command
23862386
}
2387-
return config;
2387+
Module.config = config;
23882388
} catch(e) {
2389-
return {message: "failed to load config file", error: e};
2389+
Module.config = {message: "failed to load config file", error: e};
23902390
} finally {
23912391
Module.removeRunDependency(configFilePath);
23922392
}

src/tests/FunctionalTests/WebAssembly/Browser/AOT/runtime.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var Module = {
66
config: null,
77

88
preInit: async function() {
9-
Module.config = await MONO.mono_wasm_load_config("./mono-config.json");
9+
await MONO.mono_wasm_load_config("./mono-config.json"); // sets Module.config implicitly
1010
},
1111

1212
onRuntimeInitialized: function () {

src/tests/FunctionalTests/WebAssembly/Browser/NormalInterp/runtime.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var Module = {
66
config: null,
77

88
preInit: async function() {
9-
Module.config = await MONO.mono_wasm_load_config("./mono-config.json");
9+
await MONO.mono_wasm_load_config("./mono-config.json"); // sets Module.config implicitly
1010
},
1111

1212
onRuntimeInitialized: function () {

0 commit comments

Comments
 (0)