Skip to content

Commit

Permalink
don't write the Module to the global scope; #3167
Browse files Browse the repository at this point in the history
  • Loading branch information
kripken committed Feb 4, 2015
1 parent 2431d21 commit 746230f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ else if (ENVIRONMENT_IS_SHELL) {
Module['arguments'] = arguments;
}

this['{{{ EXPORT_NAME }}}'] = Module;

#if CLOSURE_COMPILER
eval("if (typeof gc === 'function' && gc.toString().indexOf('[native code]') > 0) var gc = undefined"); // wipe out the SpiderMonkey shell 'gc' function, which can confuse closure (uses it as a minified name, and it is then initted to a non-falsey value unexpectedly)
#endif
Expand Down Expand Up @@ -149,9 +147,7 @@ else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
}));
}

if (ENVIRONMENT_IS_WEB) {
window['{{{ EXPORT_NAME }}}'] = Module;
} else {
if (ENVIRONMENT_IS_WORKER) {
Module['load'] = importScripts;
}
}
Expand Down

0 comments on commit 746230f

Please sign in to comment.