Skip to content

Commit

Permalink
fixup! pass data to cb in benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
Miroslav Bajtoš committed Jan 6, 2015
1 parent f9ce2aa commit f48e8fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions benchmark/fs/stat.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ function createCallBackBasedTest(stat) {
return function runStatViaCallbacks(cb) {
stat(FILES[0], function(err, data) {
if (err) throw err;
second();
second(data);
});

function second() {
stat(FILES[1], function(err, data) {
if (err) throw err;
third();
third(data);
});
}

function third() {
stat(FILES[2], function(err, data) {
if (err) throw err;
cb();
cb(data);
});
}
};
Expand Down

0 comments on commit f48e8fa

Please sign in to comment.