2015-05-19 13:00:06 +02:00
|
|
|
'use strict';
|
2012-12-27 21:08:23 +01:00
|
|
|
// Make sure that the nested domains don't cause the domain stack to grow
|
|
|
|
|
2015-09-28 00:31:36 +02:00
|
|
|
require('../common');
|
2012-12-27 21:08:23 +01:00
|
|
|
var assert = require('assert');
|
|
|
|
var domain = require('domain');
|
|
|
|
|
|
|
|
process.on('exit', function(c) {
|
|
|
|
assert.equal(domain._stack.length, 0);
|
|
|
|
});
|
|
|
|
|
|
|
|
domain.create().run(function() {
|
|
|
|
domain.create().run(function() {
|
|
|
|
domain.create().run(function() {
|
2015-05-19 13:00:06 +02:00
|
|
|
domain.create().on('error', function(e) {
|
2012-12-27 21:08:23 +01:00
|
|
|
// Don't need to do anything here
|
|
|
|
}).run(function() {
|
2015-05-19 13:00:06 +02:00
|
|
|
throw new Error('died');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|