Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fs: execute mkdtemp's callback with no context
All the callback functions in `fs` module are supposed to be executed with no context (`this` value should not be a valid object). But `mkdtemp`'s callback will have the `FSReqWrap` object as the context. Sample code to reproduce the problem 'use strict'; const fs = require('fs'); fs.mkdtemp('/tmp/abcd', null, function() { console.log(this); }); This would print FSReqWrap { oncomplete: [Function] } But that should have printed `null` and this patch fixes that. PR-URL: #7068 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
- Loading branch information