Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/mono/browser/runtime/loader/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
/* eslint-disable @typescript-eslint/triple-slash-reference */
/// <reference path="../types/sidecar.d.ts" />

import WasmEnableThreads from "consts:wasmEnableThreads";

import { exceptions, simd, relaxedSimd } from "wasm-feature-detect";

import gitHash from "consts:gitHash";
Expand All @@ -17,8 +19,8 @@ import { mono_log_error, set_thread_prefix, setup_proxy_console } from "./loggin
import { invokeLibraryInitializers } from "./libraryInitializers";
import { deep_merge_config, isDebuggingSupported } from "./config";

// if we are the first script loaded in the web worker, we are expected to become the sidecar
if (typeof importScripts === "function" && !globalThis.onmessage) {
// if we are ST build or the first script loaded in the web worker, we are expected to become the sidecar
if (typeof importScripts === "function" && (!WasmEnableThreads || !globalThis.onmessage)) {
(globalThis as any).dotnetSidecar = true;
}

Expand Down
Loading