src: use args.This() in zlib

Refs: https://github.com/nodejs/node/pull/53474
PR-URL: https://github.com/nodejs/node/pull/56988
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
This commit is contained in:
Michaël Zasso 2025-02-11 08:26:46 +01:00 committed by GitHub
parent de1b34557b
commit 3186468bed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -878,7 +878,7 @@ class ZstdStream final : public CompressionStream<CompressionContext> {
CHECK(args.Length() == 4 &&
"init(params, pledgedSrcSize, writeResult, writeCallback)");
ZstdStream* wrap;
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.This());
CHECK(args[2]->IsUint32Array());
uint32_t* write_result = reinterpret_cast<uint32_t*>(Buffer::Data(args[2]));