aboutsummaryrefslogtreecommitdiff
path: root/src/postamble.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/postamble.js')
-rw-r--r--src/postamble.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/postamble.js b/src/postamble.js
index f1d48ead..c8fd44bd 100644
--- a/src/postamble.js
+++ b/src/postamble.js
@@ -20,11 +20,11 @@ Module.callMain = function callMain(args) {
return _main(argc, argv, 0);
}
+{{GLOBAL_VARS}}
+
function run(args) {
args = args || Module['arguments'];
-{{GLOBAL_VARS}}
-
__globalConstructor__();
var ret = null;
@@ -38,6 +38,11 @@ Module['run'] = run;
// {{PRE_RUN_ADDITIONS}}
+// In a hackish way, we disable permissions until now, so setup code works, but enable them for runtime so compile code works with permissions
+try {
+ FS.ignorePermissions = false;
+} catch(e){}
+
#if INVOKE_RUN
#else
Module['noInitialRun'] = true;