Skip to content

Commit

Permalink
Always call runtime.reset() in App.resetCart()
Browse files Browse the repository at this point in the history
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?
  • Loading branch information
majaha authored Sep 30, 2023
1 parent 700c292 commit 4ac9502
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtimes/web/src/ui/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4ac9502

Please sign in to comment.