| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Sorry, something went wrong.
|
|
||
| proc.once('exit', common.mustCall(() => { | ||
| assert(common.fileExists(FILE_NAME)); | ||
| fs.readFile(FILE_NAME, common.mustCall((err, data) => { |
There was a problem hiding this comment.
Use fs.readFileSync here, the async version is not guaranteed to complete. In fact, it probably doesn't but that goes unnoticed because the common.mustCall(...) isn't checked as you're already inside an exit handler.
Sorry, something went wrong.
There was a problem hiding this comment.
This is a child process 'exit' event, not process.exit(). fs.readFileSync() is probably a simpler idea either way though.
Sorry, something went wrong.
There was a problem hiding this comment.
This is how all of the other trace-events tests work. I can change it, but at least it should be consistent.
Sorry, something went wrong.
PR-URL: #18005 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: #18005 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: nodejs#18005 Backport-PR-URL: nodejs#18179 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
trace_events