mirror of
https://github.com/nodejs/node.git
synced 2025-05-05 19:08:17 +00:00

Many test modules load assert but do not use it. This change removes those instances. It also removes a handful of other unused variables when they were nearby. PR-URL: https://github.com/nodejs/node/pull/4438 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
28 lines
506 B
JavaScript
28 lines
506 B
JavaScript
'use strict';
|
|
// Make sure that the domain stack doesn't get out of hand.
|
|
|
|
require('../common');
|
|
var domain = require('domain');
|
|
|
|
var a = domain.create();
|
|
a.name = 'a';
|
|
|
|
a.on('error', function() {
|
|
if (domain._stack.length > 5) {
|
|
console.error('leaking!', domain._stack);
|
|
process.exit(1);
|
|
}
|
|
});
|
|
|
|
var foo = a.bind(function() {
|
|
throw new Error('error from foo');
|
|
});
|
|
|
|
for (var i = 0; i < 1000; i++) {
|
|
process.nextTick(foo);
|
|
}
|
|
|
|
process.on('exit', function(c) {
|
|
if (!c) console.log('ok');
|
|
});
|