diff --git a/src/node_file.cc b/src/node_file.cc index c9bbea1ee5f621..a532a8ab5e7076 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -426,6 +426,7 @@ void Access(const FunctionCallbackInfo& args) { AsyncCall(env, args, "access", UTF8, AfterNoArgs, uv_fs_access, *path, mode); } else { // access(path, mode, undefined, ctx) + CHECK_EQ(args.Length(), 4); fs_req_wrap req_wrap; SyncCall(env, args[3], &req_wrap, "access", uv_fs_access, *path, mode); } @@ -447,6 +448,7 @@ void Close(const FunctionCallbackInfo& args) { AsyncCall(env, args, "close", UTF8, AfterNoArgs, uv_fs_close, fd); } else { // close(fd, undefined, ctx) + CHECK_EQ(args.Length(), 3); fs_req_wrap req_wrap; SyncCall(env, args[2], &req_wrap, "close", uv_fs_close, fd); }