src: remove 2nd undefined argument in node_file.cc#20629
src: remove 2nd undefined argument in node_file.cc#20629dankang wants to merge 1 commit intonodejs:masterfrom
undefined argument in node_file.cc#20629Conversation
src/node_file.cc
Outdated
There was a problem hiding this comment.
Isn't the length check here redundant as it will always be 2? Why not just check the undefined-ness?
There was a problem hiding this comment.
Yes, right. I fixed.
I thought somebody can modify the function to multiple arguments, but too much worry.
|
The newly added test seems to be causing a hard crash. |
|
It seems sequential/test-fs-close-cb-parameters.js is the one crashing now. |
|
@mscdex I modified the test cases.
|
|
Tests failed in several linux versions. |
|
I set an ubuntu1710-x64 system on AWS that had failed in the CI node-test-commit-linux. Also, I tested it on debian9-64 on AWS, it was successful.
Could you please tell me what I should do more in this case? |
|
I think those are just unrelated, flaky failures. |
|
I rebased master branch and tested on 3 different linux systems. |
|
In this time, the CI run failed at fetching git repo step in osx. |
3835724 to
7b958c3
Compare
|
I rebased master and merged my commits.
Can anybody run a CI test? |
In the document for fs, there are several functions that state "No arguments other than a possible exception are given to the completion callback." (ex> fs.access, fs.chmod, fs.close, ..) But, the functions are invoking the callback with two parameters (err, undefined) It causes problems in using several API like [async.waterfall](https://caolan.github.io/async/docs.html#waterfall). Fixes: nodejs#20335
In the document for fs, there are several functions that state "No arguments other than a possible exception are given to the completion callback." (ex> fs.access, fs.chmod, fs.close, ..) But, the functions are invoking the callback with two parameters (err, undefined) It causes problems in using several API like [async.waterfall](https://caolan.github.io/async/docs.html#waterfall). PR-URL: nodejs#20629 Fixes: nodejs#20335 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
|
Thanks a lot! 👍 |
In the document for fs, there are several functions that state "No arguments other than a possible exception are given to the completion callback." (ex> fs.access, fs.chmod, fs.close, ..) But, the functions are invoking the callback with two parameters (err, undefined) It causes problems in using several API like [async.waterfall](https://caolan.github.io/async/docs.html#waterfall). PR-URL: #20629 Fixes: #20335 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
In the document for fs, there are several functions that state "No
arguments other than a possible exception are given to the completion
callback." (ex> fs.access, fs.chmod, fs.close, ..)
But, the functions are invoking the callback with two parameters (err,
undefined)
It causes problems in using several API like
async.waterfall.
Fixes: #20335
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes