aboutsummaryrefslogtreecommitdiff
path: root/src/preamble.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/preamble.js')
-rw-r--r--src/preamble.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/preamble.js b/src/preamble.js
index 0232ff20..44f5c876 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -287,11 +287,12 @@ function __initializeRuntime__() {
function __shutdownRuntime__() {
while( __ATEXIT__.length > 0) {
- var func = __ATEXIT__.pop();
+ var atexit = __ATEXIT__.pop();
+ var func = atexit.func;
if (typeof func === 'number') {
func = FUNCTION_TABLE[func];
}
- func();
+ func(atexit.arg);
}
}