Closed
Description
- 4.4.3:
- Ubuntu 14.04:
Hi,
We tried to update from 0.10.33 to 4.4.3, but the code below causes some issues. As you can see in the code below in 0.10.33 there was a check to see if _onImmediate was defined and in 4.4.3 there is not which causes the following error.
immediate._onImmediate is not a function
Is this a know issue and is there a know fix, or we have to go and find and fix the places where _undefined_ is passed as onImmediate function?
Node 0.10.33
if (immediate._onImmediate) {
if (immediate.domain) immediate.domain.enter();
immediate._onImmediate();
if (immediate.domain) immediate.domain.exit();
}
Node 4.4.3
try {
immediate._onImmediate();
threw = false;
} finally {
if (threw) {
if (!L.isEmpty(queue)) {
// Handle any remaining on next tick, assuming we're still
// alive to do so.
while (!L.isEmpty(immediateQueue)) {
L.append(queue, L.shift(immediateQueue));
}
immediateQueue = queue;
process.nextTick(processImmediate);
}
}
}