-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
Here is a test case you can run with node 0.11.14 and iojs 1.0.x.
var fs = require('fs');
function writeSync(text) { fs.writeSync(1, text + '\n'); fs.fsyncSync(1); }
Error.stackTraceLimit = Infinity;
// Enable asyncWrap and call init hook function on async initialization
try {
var tracing = require('tracing');
// Setup an async listener with the handlers listed below
tracing.addAsyncListener({
'create': asyncFunctionInitialized,
'before': asyncCallbackBefore,
'error': asyncCallbackError,
'after': asyncCallbackAfter
});
} catch (e) {
var asyncWrap = process.binding('async_wrap');
var asyncHooksObject = {};
var kCallInitHook = 0;
asyncWrap.setupHooks(
asyncHooksObject,
asyncFunctionInitialized,
asyncCallbackBefore,
asyncCallbackAfter);
asyncHooksObject[kCallInitHook] = 1;
}
function asyncFunctionInitialized() {
writeSync((new Error()).stack);
}
function asyncCallbackBefore() {}
function asyncCallbackError() {}
function asyncCallbackAfter() {}
// TEST
(function outer() {
setImmediate(function () {
writeSync('END');
});
})();In the node 0.11.14 asyncFunctionInitialized is called and the stack trace is printed. However in iojs 1.0.x just END is printed. This also seams to be the case for process.nextTick.
issue tracing: AndreasMadsen/trace#12
Metadata
Metadata
Assignees
Labels
No labels