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
+16
-16
@@ -563,7 +563,7 @@ class Parser : public AsyncWrap, public StreamListener {
|
||||
|
||||
static void Close(const FunctionCallbackInfo<Value>& args) {
|
||||
Parser* parser;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.This());
|
||||
|
||||
delete parser;
|
||||
}
|
||||
@@ -571,7 +571,7 @@ class Parser : public AsyncWrap, public StreamListener {
|
||||
|
||||
static void Free(const FunctionCallbackInfo<Value>& args) {
|
||||
Parser* parser;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.This());
|
||||
|
||||
// Since the Parser destructor isn't going to run the destroy() callbacks
|
||||
// it needs to be triggered manually.
|
||||
@@ -581,7 +581,7 @@ class Parser : public AsyncWrap, public StreamListener {
|
||||
|
||||
static void Remove(const FunctionCallbackInfo<Value>& args) {
|
||||
Parser* parser;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.This());
|
||||
|
||||
if (parser->connectionsList_ != nullptr) {
|
||||
parser->connectionsList_->Pop(parser);
|
||||
@@ -605,7 +605,7 @@ class Parser : public AsyncWrap, public StreamListener {
|
||||
// var bytesParsed = parser->execute(buffer);
|
||||
static void Execute(const FunctionCallbackInfo<Value>& args) {
|
||||
Parser* parser;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.This());
|
||||
|
||||
ArrayBufferViewContents<char> buffer(args[0]);
|
||||
|
||||
@@ -618,7 +618,7 @@ class Parser : public AsyncWrap, public StreamListener {
|
||||
|
||||
static void Finish(const FunctionCallbackInfo<Value>& args) {
|
||||
Parser* parser;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.This());
|
||||
|
||||
Local<Value> ret = parser->Execute(nullptr, 0);
|
||||
|
||||
@@ -661,7 +661,7 @@ class Parser : public AsyncWrap, public StreamListener {
|
||||
|
||||
CHECK(type == HTTP_REQUEST || type == HTTP_RESPONSE);
|
||||
Parser* parser;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.This());
|
||||
// Should always be called from the same context.
|
||||
CHECK_EQ(env, parser->env());
|
||||
|
||||
@@ -695,7 +695,7 @@ class Parser : public AsyncWrap, public StreamListener {
|
||||
static void Pause(const FunctionCallbackInfo<Value>& args) {
|
||||
Environment* env = Environment::GetCurrent(args);
|
||||
Parser* parser;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.This());
|
||||
// Should always be called from the same context.
|
||||
CHECK_EQ(env, parser->env());
|
||||
|
||||
@@ -709,7 +709,7 @@ class Parser : public AsyncWrap, public StreamListener {
|
||||
|
||||
static void Consume(const FunctionCallbackInfo<Value>& args) {
|
||||
Parser* parser;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.This());
|
||||
CHECK(args[0]->IsObject());
|
||||
StreamBase* stream = StreamBase::FromObject(args[0].As<Object>());
|
||||
CHECK_NOT_NULL(stream);
|
||||
@@ -719,7 +719,7 @@ class Parser : public AsyncWrap, public StreamListener {
|
||||
|
||||
static void Unconsume(const FunctionCallbackInfo<Value>& args) {
|
||||
Parser* parser;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.This());
|
||||
|
||||
// Already unconsumed
|
||||
if (parser->stream_ == nullptr)
|
||||
@@ -731,7 +731,7 @@ class Parser : public AsyncWrap, public StreamListener {
|
||||
|
||||
static void GetCurrentBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
Parser* parser;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.This());
|
||||
|
||||
Local<Object> ret = Buffer::Copy(
|
||||
parser->env(),
|
||||
@@ -743,7 +743,7 @@ class Parser : public AsyncWrap, public StreamListener {
|
||||
|
||||
static void Duration(const FunctionCallbackInfo<Value>& args) {
|
||||
Parser* parser;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.This());
|
||||
|
||||
if (parser->last_message_start_ == 0) {
|
||||
args.GetReturnValue().Set(0);
|
||||
@@ -756,7 +756,7 @@ class Parser : public AsyncWrap, public StreamListener {
|
||||
|
||||
static void HeadersCompleted(const FunctionCallbackInfo<Value>& args) {
|
||||
Parser* parser;
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&parser, args.This());
|
||||
|
||||
args.GetReturnValue().Set(parser->headers_completed_);
|
||||
}
|
||||
@@ -1087,7 +1087,7 @@ void ConnectionsList::All(const FunctionCallbackInfo<Value>& args) {
|
||||
|
||||
ConnectionsList* list;
|
||||
|
||||
ASSIGN_OR_RETURN_UNWRAP(&list, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&list, args.This());
|
||||
|
||||
std::vector<Local<Value>> result;
|
||||
result.reserve(list->all_connections_.size());
|
||||
@@ -1104,7 +1104,7 @@ void ConnectionsList::Idle(const FunctionCallbackInfo<Value>& args) {
|
||||
|
||||
ConnectionsList* list;
|
||||
|
||||
ASSIGN_OR_RETURN_UNWRAP(&list, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&list, args.This());
|
||||
|
||||
std::vector<Local<Value>> result;
|
||||
result.reserve(list->all_connections_.size());
|
||||
@@ -1123,7 +1123,7 @@ void ConnectionsList::Active(const FunctionCallbackInfo<Value>& args) {
|
||||
|
||||
ConnectionsList* list;
|
||||
|
||||
ASSIGN_OR_RETURN_UNWRAP(&list, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&list, args.This());
|
||||
|
||||
std::vector<Local<Value>> result;
|
||||
result.reserve(list->active_connections_.size());
|
||||
@@ -1140,7 +1140,7 @@ void ConnectionsList::Expired(const FunctionCallbackInfo<Value>& args) {
|
||||
|
||||
ConnectionsList* list;
|
||||
|
||||
ASSIGN_OR_RETURN_UNWRAP(&list, args.Holder());
|
||||
ASSIGN_OR_RETURN_UNWRAP(&list, args.This());
|
||||
CHECK(args[0]->IsNumber());
|
||||
CHECK(args[1]->IsNumber());
|
||||
uint64_t headers_timeout =
|
||||
|
||||
Reference in new issue
Block a user