summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-07-16 16:38:11 -0700
committerisaacs <i@izs.me>2012-07-16 18:04:55 -0700
commitd6b78d0e3769e4af1b1a60e89f53faf20e4bb2b3 (patch)
treeea99aec72d19c8cd5efac435b4ee070732d40ed7 /lib
parent19aa05fab89c70c4416efc36d689b460333cee2f (diff)
downloadandroid-node-v8-d6b78d0e3769e4af1b1a60e89f53faf20e4bb2b3.tar.gz
android-node-v8-d6b78d0e3769e4af1b1a60e89f53faf20e4bb2b3.tar.bz2
android-node-v8-d6b78d0e3769e4af1b1a60e89f53faf20e4bb2b3.zip
domain: Fix stack leak on error
Diffstat (limited to 'lib')
-rw-r--r--lib/domain.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/domain.js b/lib/domain.js
index 1524627a5c..e219c5e507 100644
--- a/lib/domain.js
+++ b/lib/domain.js
@@ -41,6 +41,7 @@ exports.create = exports.createDomain = function(cb) {
// it's possible to enter one domain while already inside
// another one. the stack is each entered domain.
var stack = [];
+exports._stack = stack;
// the active domain is always the one that we're currently in.
exports.active = null;
@@ -58,6 +59,7 @@ function uncaughtHandler(er) {
domain_thrown: true
});
exports.active.emit('error', er);
+ exports.active.exit();
} else if (process.listeners('uncaughtException').length === 1) {
// if there are other handlers, then they'll take care of it.
// but if not, then we need to crash now.