From 4ac950213016c27ab43a7a40fa6838dde1aec73a Mon Sep 17 00:00:00 2001 From: Matt Harding Date: Sat, 30 Sep 2023 18:06:45 +0100 Subject: [PATCH] Always call runtime.reset() in App.resetCart() I think this is technically the right thing to do, just in case the wasm start function or WASI _start/_initialize functions read from memory and then set some global variables (I don't know why they would, but they could.) Probably wouldn't be necessary if we fixed the global variable problem, maybe? --- runtimes/web/src/ui/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtimes/web/src/ui/app.ts b/runtimes/web/src/ui/app.ts index 24cbadc5..26ace025 100644 --- a/runtimes/web/src/ui/app.ts +++ b/runtimes/web/src/ui/app.ts @@ -646,9 +646,9 @@ export class App extends LitElement { // Take a snapshot state = new State(); state.read(this.runtime); - } else { - this.runtime.reset(true); } + this.runtime.reset(true); + this.runtime.pauseState |= constants.PAUSE_REBOOTING; await this.runtime.load(wasmBuffer);