src: use args.This() instead of Holder

The latter is deprecated in V8.

Refs: http://crbug.com/333672197
PR-URL: https://github.com/nodejs/node/pull/53474
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
This commit is contained in:
Michaël Zasso committed 2024-06-20 15:38:16 +02:00
1 parent 977beab729
commit 15df4edd22
50 files changed
+356 -382

No files matched your search

+2 -2
View File
@@ -187,7 +187,7 @@ void DirHandle::Close(const FunctionCallbackInfo<Value>& args) {
CHECK_GE(argc, 1);
DirHandle* dir;
ASSIGN_OR_RETURN_UNWRAP(&dir, args.Holder());
ASSIGN_OR_RETURN_UNWRAP(&dir, args.This());
dir->closing_ = false;
dir->closed_ = true;
@@ -288,7 +288,7 @@ void DirHandle::Read(const FunctionCallbackInfo<Value>& args) {
const enum encoding encoding = ParseEncoding(isolate, args[0], UTF8);
DirHandle* dir;
ASSIGN_OR_RETURN_UNWRAP(&dir, args.Holder());
ASSIGN_OR_RETURN_UNWRAP(&dir, args.This());
CHECK(args[1]->IsNumber());
uint64_t buffer_size = static_cast<uint64_t>(args[1].As<Number>()->Value());