mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-11 13:59:23 -04:00
Prevent the runtime from spawning new stepping intervals
This commit is contained in:
parent
05979e2e93
commit
4378603d36
2 changed files with 19 additions and 0 deletions
src/engine
|
@ -2172,6 +2172,9 @@ class Runtime extends EventEmitter {
|
|||
* Set up timers to repeatedly step in a browser.
|
||||
*/
|
||||
start () {
|
||||
// Do not start if we are already running
|
||||
if (this._steppingInterval) return;
|
||||
|
||||
let interval = Runtime.THREAD_STEP_INTERVAL;
|
||||
if (this.compatibilityMode) {
|
||||
interval = Runtime.THREAD_STEP_INTERVAL_COMPATIBILITY;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue