mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
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:
50 files changed
+356
-382
No files matched your search
+6
-6
@@ -288,7 +288,7 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
|
||||
|
||||
static void Close(const FunctionCallbackInfo<Value>& args) {
|
||||
CompressionStream* ctx;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&ctx, args.This());
|
||||
ctx->Close();
|
||||
}
|
||||
|
||||
@@ -339,7 +339,7 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
|
||||
out = Buffer::Data(out_buf) + out_off;
|
||||
|
||||
CompressionStream* ctx;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&ctx, args.This());
|
||||
|
||||
ctx->Write<async>(flush, in, in_len, out, out_len);
|
||||
}
|
||||
@@ -453,7 +453,7 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
|
||||
|
||||
static void Reset(const FunctionCallbackInfo<Value> &args) {
|
||||
CompressionStream* wrap;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.This());
|
||||
|
||||
AllocScope alloc_scope(wrap);
|
||||
const CompressionError err = wrap->context()->ResetStream();
|
||||
@@ -585,7 +585,7 @@ class ZlibStream final : public CompressionStream<ZlibContext> {
|
||||
" dictionary)");
|
||||
|
||||
ZlibStream* wrap;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.This());
|
||||
|
||||
Local<Context> context = args.GetIsolate()->GetCurrentContext();
|
||||
|
||||
@@ -633,7 +633,7 @@ class ZlibStream final : public CompressionStream<ZlibContext> {
|
||||
static void Params(const FunctionCallbackInfo<Value>& args) {
|
||||
CHECK(args.Length() == 2 && "params(level, strategy)");
|
||||
ZlibStream* wrap;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.This());
|
||||
Local<Context> context = args.GetIsolate()->GetCurrentContext();
|
||||
int level;
|
||||
if (!args[0]->Int32Value(context).To(&level)) return;
|
||||
@@ -676,7 +676,7 @@ class BrotliCompressionStream final :
|
||||
|
||||
static void Init(const FunctionCallbackInfo<Value>& args) {
|
||||
BrotliCompressionStream* wrap;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&wrap, args.This());
|
||||
CHECK(args.Length() == 3 && "init(params, writeResult, writeCallback)");
|
||||
|
||||
CHECK(args[1]->IsUint32Array());
|
||||
|
||||
Reference in new issue
Block a user