aboutsummaryrefslogtreecommitdiff
path: root/src/postamble.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-01-14 14:49:08 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-01-14 14:49:29 -0800
commit836ca84817da520a818bf568470e6f853864410c (patch)
treebcfd016f6b2cdefdb84254615a052813a9899248 /src/postamble.js
parentc8529f6fa67bc6f5adada4fc3f9804c852371c50 (diff)
fix double start bug #1992 in browser as well
Diffstat (limited to 'src/postamble.js')
-rw-r--r--src/postamble.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/postamble.js b/src/postamble.js
index d6c059b8..90a86474 100644
--- a/src/postamble.js
+++ b/src/postamble.js
@@ -121,12 +121,13 @@ function run(args) {
if (Module['calledRun']) return; // run may have just been called through dependencies being fulfilled just in this very frame
function doRun() {
+ if (Module['calledRun']) return; // run may have just been called while the async setStatus time below was happening
+ Module['calledRun'] = true;
+
ensureInitRuntime();
preMain();
- assert(!Module['calledRun']);
- Module['calledRun'] = true;
if (Module['_main'] && shouldRunNow) {
Module['callMain'](args);
}