diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-03-05 03:02:57 +0100 |
---|---|---|
committer | Beth Griggs <Bethany.Griggs@uk.ibm.com> | 2020-04-07 16:30:15 +0100 |
commit | 78c82a38ac026a692bcbd8115f2cd8a6020a5756 (patch) | |
tree | 24e3958f4db87f8a9e41523dd25065c0e46ed016 /src/node_dir.cc | |
parent | 7005670f3496e6fb59e54a793aaec5249ce5c422 (diff) | |
download | node-new-78c82a38ac026a692bcbd8115f2cd8a6020a5756.tar.gz |
src: move fs state out of Environment
Moves state that is specific to the `fs` binding into the
`fs` binding implementation as a cleanup.
PR-URL: https://github.com/nodejs/node/pull/32538
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_dir.cc')
-rw-r--r-- | src/node_dir.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node_dir.cc b/src/node_dir.cc index 9923f04277..c4aaf4bcd3 100644 --- a/src/node_dir.cc +++ b/src/node_dir.cc @@ -152,7 +152,7 @@ void DirHandle::Close(const FunctionCallbackInfo<Value>& args) { dir->closing_ = false; dir->closed_ = true; - FSReqBase* req_wrap_async = GetReqWrap(env, args[0]); + FSReqBase* req_wrap_async = GetReqWrap(args, 0); if (req_wrap_async != nullptr) { // close(req) AsyncCall(env, req_wrap_async, args, "closedir", UTF8, AfterClose, uv_fs_closedir, dir->dir()); @@ -252,7 +252,7 @@ void DirHandle::Read(const FunctionCallbackInfo<Value>& args) { dir->dir_->dirents = dir->dirents_.data(); } - FSReqBase* req_wrap_async = GetReqWrap(env, args[2]); + FSReqBase* req_wrap_async = GetReqWrap(args, 2); if (req_wrap_async != nullptr) { // dir.read(encoding, bufferSize, req) AsyncCall(env, req_wrap_async, args, "readdir", encoding, AfterDirRead, uv_fs_readdir, dir->dir()); @@ -320,7 +320,7 @@ static void OpenDir(const FunctionCallbackInfo<Value>& args) { const enum encoding encoding = ParseEncoding(isolate, args[1], UTF8); - FSReqBase* req_wrap_async = GetReqWrap(env, args[2]); + FSReqBase* req_wrap_async = GetReqWrap(args, 2); if (req_wrap_async != nullptr) { // openDir(path, encoding, req) AsyncCall(env, req_wrap_async, args, "opendir", encoding, AfterOpenDir, uv_fs_opendir, *path); |