Initialize the runtime state correctly for debugging (#19426)

* Initialize the runtime state correctly for debugging

On startup the DebugProxy needs to know when the runtime
has initialized enough to be able to begin interaction
this is accomplished by breaking in mono_wasm_runtime_ready()
which the Proxy sees does initialization and then resumes from.
Simply setting mono_wasm_runtime_is_ready breaks that logic,
but even worse it appears that the variable is linked out
in the release version

* Regen webassembly.js

Co-authored-by: Larry Ewing <lewing@microsoft.com>
This commit is contained in:
Pranav K 2020-02-28 08:17:24 -08:00 committed by GitHub
parent 0216ca2086
commit 555cf52454
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -215,7 +215,7 @@ function createEmscriptenModuleInstance(resourceLoader: WebAssemblyResourceLoade
MONO.mono_wasm_setenv("MONO_URI_DOTNETRELATIVEORABSOLUTE", "true");
const load_runtime = Module.cwrap('mono_wasm_load_runtime', null, ['string', 'number']);
load_runtime(appBinDirName, hasDebuggingEnabled() ? 1 : 0);
MONO.mono_wasm_runtime_is_ready = true;
MONO.mono_wasm_runtime_ready ();
attachInteropInvoker();
onReady();
});

View File

@ -22,6 +22,7 @@ declare namespace Mono {
declare namespace MONO {
var loaded_files: string[];
var mono_wasm_runtime_is_ready: boolean;
function mono_wasm_runtime_ready (): void;
function mono_wasm_setenv (name: string, value: string): void;
}