node: remove duplicate infoBox checks
These checks are now done in C++ and don't need to also be checked in JS. Also remove a couple unused variables.
This commit is contained in:
parent
0aa13357d6
commit
ab5dabf876
30
src/node.js
30
src/node.js
@ -350,13 +350,8 @@
|
|||||||
// run callbacks that have no domain
|
// run callbacks that have no domain
|
||||||
// using domains will cause this to be overridden
|
// using domains will cause this to be overridden
|
||||||
function _tickCallback() {
|
function _tickCallback() {
|
||||||
var callback, nextTickLength, threw;
|
var callback, threw;
|
||||||
|
|
||||||
if (infoBox[inTick] === 1) return;
|
|
||||||
if (infoBox[length] === 0) {
|
|
||||||
infoBox[index] = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
infoBox[inTick] = 1;
|
infoBox[inTick] = 1;
|
||||||
|
|
||||||
while (infoBox[index] < infoBox[length]) {
|
while (infoBox[index] < infoBox[length]) {
|
||||||
@ -374,26 +369,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _tickDomainCallback() {
|
function _tickDomainCallback() {
|
||||||
var nextTickLength, tock, callback;
|
var tock, callback, domain;
|
||||||
|
|
||||||
if (infoBox[lastThrew] === 1) {
|
|
||||||
infoBox[lastThrew] = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (infoBox[inTick] === 1) return;
|
|
||||||
if (infoBox[length] === 0) {
|
|
||||||
infoBox[index] = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
infoBox[inTick] = 1;
|
infoBox[inTick] = 1;
|
||||||
|
|
||||||
while (infoBox[index] < infoBox[length]) {
|
while (infoBox[index] < infoBox[length]) {
|
||||||
tock = nextTickQueue[infoBox[index]++];
|
tock = nextTickQueue[infoBox[index]++];
|
||||||
callback = tock.callback;
|
callback = tock.callback;
|
||||||
if (tock.domain) {
|
domain = tock.domain;
|
||||||
if (tock.domain._disposed) continue;
|
if (domain) {
|
||||||
tock.domain.enter();
|
if (domain._disposed) continue;
|
||||||
|
domain.enter();
|
||||||
}
|
}
|
||||||
infoBox[lastThrew] = 1;
|
infoBox[lastThrew] = 1;
|
||||||
try {
|
try {
|
||||||
@ -402,8 +388,8 @@
|
|||||||
} finally {
|
} finally {
|
||||||
if (infoBox[lastThrew] === 1) tickDone();
|
if (infoBox[lastThrew] === 1) tickDone();
|
||||||
}
|
}
|
||||||
if (tock.domain)
|
if (domain)
|
||||||
tock.domain.exit();
|
domain.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
tickDone();
|
tickDone();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user