Skip to content

Commit 4051bb4

Browse files
authored
disable on_demand_gc until AOT issues are identified (#31847)
1 parent bfe0a0b commit 4051bb4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Platform/Mono/MonoPlatform.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,9 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade
427427
timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
428428
} catch { }
429429
MONO.mono_wasm_setenv("TZ", timeZone || 'UTC');
430-
430+
// Turn off full-gc to prevent browser freezing.
431+
const mono_wasm_enable_on_demand_gc = cwrap('mono_wasm_enable_on_demand_gc', null, ['number']);
432+
mono_wasm_enable_on_demand_gc(0);
431433
if (resourceLoader.bootConfig.modifiableAssemblies) {
432434
// Configure the app to enable hot reload in Development.
433435
MONO.mono_wasm_setenv('DOTNET_MODIFIABLE_ASSEMBLIES', resourceLoader.bootConfig.modifiableAssemblies);

0 commit comments

Comments
 (0)