Mite need to rethink a couple of those "4chanXInitFinished" cb()s...
This commit is contained in:
parent
8362df654c
commit
f269690b3e
@ -9658,7 +9658,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
callbackNodesDB: function(klass, nodes, cb) {
|
callbackNodesDB: function(klass, nodes, cb) {
|
||||||
var errors, func, i, len, node, queue, softTask, _i;
|
var errors, func, i, len, node, queue, softTask;
|
||||||
|
|
||||||
queue = [];
|
queue = [];
|
||||||
softTask = function() {
|
softTask = function() {
|
||||||
@ -9671,7 +9671,7 @@
|
|||||||
func = task[0];
|
func = task[0];
|
||||||
args = Array.prototype.slice.call(task, 1);
|
args = Array.prototype.slice.call(task, 1);
|
||||||
func.apply(func, args);
|
func.apply(func, args);
|
||||||
return setTimeout(softTask, 20);
|
return setTimeout(softTask, 0);
|
||||||
};
|
};
|
||||||
len = nodes.length;
|
len = nodes.length;
|
||||||
i = 0;
|
i = 0;
|
||||||
@ -9696,15 +9696,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i === len) {
|
if (i === len) {
|
||||||
cb();
|
|
||||||
if (errors) {
|
if (errors) {
|
||||||
return Main.handleErrors(errors);
|
Main.handleErrors(errors);
|
||||||
|
}
|
||||||
|
if (cb) {
|
||||||
|
return cb();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
for (i = _i = 0; 0 <= len ? _i < len : _i > len; i = 0 <= len ? ++_i : --_i) {
|
while (i < len) {
|
||||||
node = nodes[i];
|
node = nodes[i];
|
||||||
queue.push([func, node, i]);
|
queue.push([func, node, ++i]);
|
||||||
}
|
}
|
||||||
return softTask();
|
return softTask();
|
||||||
},
|
},
|
||||||
|
|||||||
@ -9681,7 +9681,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
callbackNodesDB: function(klass, nodes, cb) {
|
callbackNodesDB: function(klass, nodes, cb) {
|
||||||
var errors, func, i, len, node, queue, softTask, _i;
|
var errors, func, i, len, node, queue, softTask;
|
||||||
|
|
||||||
queue = [];
|
queue = [];
|
||||||
softTask = function() {
|
softTask = function() {
|
||||||
@ -9694,7 +9694,7 @@
|
|||||||
func = task[0];
|
func = task[0];
|
||||||
args = Array.prototype.slice.call(task, 1);
|
args = Array.prototype.slice.call(task, 1);
|
||||||
func.apply(func, args);
|
func.apply(func, args);
|
||||||
return setTimeout(softTask, 20);
|
return setTimeout(softTask, 0);
|
||||||
};
|
};
|
||||||
len = nodes.length;
|
len = nodes.length;
|
||||||
i = 0;
|
i = 0;
|
||||||
@ -9719,15 +9719,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i === len) {
|
if (i === len) {
|
||||||
cb();
|
|
||||||
if (errors) {
|
if (errors) {
|
||||||
return Main.handleErrors(errors);
|
Main.handleErrors(errors);
|
||||||
|
}
|
||||||
|
if (cb) {
|
||||||
|
return cb();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
for (i = _i = 0; 0 <= len ? _i < len : _i > len; i = 0 <= len ? ++_i : --_i) {
|
while (i < len) {
|
||||||
node = nodes[i];
|
node = nodes[i];
|
||||||
queue.push([func, node, i]);
|
queue.push([func, node, ++i]);
|
||||||
}
|
}
|
||||||
return softTask();
|
return softTask();
|
||||||
},
|
},
|
||||||
|
|||||||
@ -9524,7 +9524,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
callbackNodesDB: function(klass, nodes, cb) {
|
callbackNodesDB: function(klass, nodes, cb) {
|
||||||
var errors, func, i, len, node, queue, softTask, _i;
|
var errors, func, i, len, node, queue, softTask;
|
||||||
|
|
||||||
queue = [];
|
queue = [];
|
||||||
softTask = function() {
|
softTask = function() {
|
||||||
@ -9537,7 +9537,7 @@
|
|||||||
func = task[0];
|
func = task[0];
|
||||||
args = Array.prototype.slice.call(task, 1);
|
args = Array.prototype.slice.call(task, 1);
|
||||||
func.apply(func, args);
|
func.apply(func, args);
|
||||||
return setTimeout(softTask, 20);
|
return setTimeout(softTask, 0);
|
||||||
};
|
};
|
||||||
len = nodes.length;
|
len = nodes.length;
|
||||||
i = 0;
|
i = 0;
|
||||||
@ -9562,15 +9562,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i === len) {
|
if (i === len) {
|
||||||
cb();
|
|
||||||
if (errors) {
|
if (errors) {
|
||||||
return Main.handleErrors(errors);
|
Main.handleErrors(errors);
|
||||||
|
}
|
||||||
|
if (cb) {
|
||||||
|
return cb();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
for (i = _i = 0; 0 <= len ? _i < len : _i > len; i = 0 <= len ? ++_i : --_i) {
|
while (i < len) {
|
||||||
node = nodes[i];
|
node = nodes[i];
|
||||||
queue.push([func, node, i]);
|
queue.push([func, node, ++i]);
|
||||||
}
|
}
|
||||||
return softTask();
|
return softTask();
|
||||||
},
|
},
|
||||||
|
|||||||
@ -228,7 +228,7 @@ Main =
|
|||||||
func = task[0]
|
func = task[0]
|
||||||
args = Array::slice.call task, 1
|
args = Array::slice.call task, 1
|
||||||
func.apply func, args
|
func.apply func, args
|
||||||
setTimeout softTask, 20
|
setTimeout softTask, 0
|
||||||
|
|
||||||
# get the nodes' length only once
|
# get the nodes' length only once
|
||||||
len = nodes.length
|
len = nodes.length
|
||||||
@ -247,12 +247,13 @@ Main =
|
|||||||
error: err
|
error: err
|
||||||
# finish
|
# finish
|
||||||
if i is len
|
if i is len
|
||||||
cb()
|
|
||||||
Main.handleErrors errors if errors
|
Main.handleErrors errors if errors
|
||||||
|
cb() if cb
|
||||||
|
|
||||||
for i in [0...len]
|
while i < len
|
||||||
node = nodes[i]
|
node = nodes[i]
|
||||||
queue.push [func, node, i]
|
queue.push [func, node, ++i]
|
||||||
|
|
||||||
softTask()
|
softTask()
|
||||||
|
|
||||||
addCallback: (e) ->
|
addCallback: (e) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user