Skip to content

Commit

Permalink
fix #92713 (#92890)
Browse files Browse the repository at this point in the history
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
  • Loading branch information
github-actions[bot] and pavelsavara committed Oct 3, 2023
1 parent 172d79a commit 8e365ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mono/wasm/runtime/startup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import MonoWasmThreads from "consts:monoWasmThreads";
import WasmEnableLegacyJsInterop from "consts:wasmEnableLegacyJsInterop";

import { DotnetModuleInternal, CharPtrNull } from "./types/internal";
import { linkerDisableLegacyJsInterop, ENVIRONMENT_IS_PTHREAD, exportedRuntimeAPI, INTERNAL, loaderHelpers, Module, runtimeHelpers, createPromiseController, mono_assert, linkerWasmEnableSIMD, linkerWasmEnableEH } from "./globals";
import { linkerDisableLegacyJsInterop, ENVIRONMENT_IS_PTHREAD, exportedRuntimeAPI, INTERNAL, loaderHelpers, Module, runtimeHelpers, createPromiseController, mono_assert, linkerWasmEnableSIMD, linkerWasmEnableEH, ENVIRONMENT_IS_NODE, ENVIRONMENT_IS_WORKER } from "./globals";
import cwraps, { init_c_exports } from "./cwraps";
import { mono_wasm_raise_debug_event, mono_wasm_runtime_ready } from "./debug";
import { toBase64StringImpl } from "./base64";
Expand Down Expand Up @@ -273,6 +273,10 @@ async function onRuntimeInitializedAsync(userOnRuntimeInitialized: () => void) {
bindings_init();
runtimeHelpers.runtimeReady = true;

if (ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER) {
Module.runtimeKeepalivePush();
}

if (MonoWasmThreads) {
runtimeHelpers.javaScriptExports.install_synchronization_context();
runtimeHelpers.jsSynchronizationContextInstalled = true;
Expand Down

0 comments on commit 8e365ee

Please sign in to comment.