@@ -36,7 +36,7 @@ struct HttpResponseWrapper {
36
36
template <int PROTOCOL>
37
37
static inline constexpr decltype (auto ) getHttpResponse(const FunctionCallbackInfo<Value> &args) {
38
38
Isolate *isolate = args.GetIsolate ();
39
- void *res = args.Holder ()->GetAlignedPointerFromInternalField (0 );
39
+ void *res = args.This ()->GetAlignedPointerFromInternalField (0 );
40
40
if (!res) {
41
41
args.GetReturnValue ().Set (isolate->ThrowException (v8::Exception::Error (String::NewFromUtf8 (isolate, " uWS.HttpResponse must not be accessed after uWS.HttpResponse.onAborted callback, or after a successful response. See documentation for uWS.HttpResponse and consult the user manual." , NewStringType::kNormal ).ToLocalChecked ())));
42
42
}
@@ -53,7 +53,7 @@ struct HttpResponseWrapper {
53
53
54
54
/* Marks this JS object invalid */
55
55
static inline void invalidateResObject (const FunctionCallbackInfo<Value> &args) {
56
- args.Holder ()->SetAlignedPointerInInternalField (0 , nullptr );
56
+ args.This ()->SetAlignedPointerInInternalField (0 , nullptr );
57
57
}
58
58
59
59
/* Takes nothing, returns this */
@@ -62,7 +62,7 @@ struct HttpResponseWrapper {
62
62
auto *res = getHttpResponse<SSL>(args);
63
63
if (res) {
64
64
res->pause ();
65
- args.GetReturnValue ().Set (args.Holder ());
65
+ args.GetReturnValue ().Set (args.This ());
66
66
}
67
67
}
68
68
@@ -72,7 +72,7 @@ struct HttpResponseWrapper {
72
72
auto *res = getHttpResponse<SSL>(args);
73
73
if (res) {
74
74
res->resume ();
75
- args.GetReturnValue ().Set (args.Holder ());
75
+ args.GetReturnValue ().Set (args.This ());
76
76
}
77
77
}
78
78
@@ -83,7 +83,7 @@ struct HttpResponseWrapper {
83
83
if (res) {
84
84
invalidateResObject (args);
85
85
res->close ();
86
- args.GetReturnValue ().Set (args.Holder ());
86
+ args.GetReturnValue ().Set (args.This ());
87
87
}
88
88
}
89
89
@@ -107,7 +107,7 @@ struct HttpResponseWrapper {
107
107
dataArrayBuffer->Detach ();
108
108
});
109
109
110
- args.GetReturnValue ().Set (args.Holder ());
110
+ args.GetReturnValue ().Set (args.This ());
111
111
}
112
112
}
113
113
@@ -121,7 +121,7 @@ struct HttpResponseWrapper {
121
121
UniquePersistent<Function> p (isolate, Local<Function>::Cast (args[0 ]));
122
122
123
123
/* This is how we capture res (C++ this in invocation of this function) */
124
- UniquePersistent<Object> resObject (isolate, args.Holder ());
124
+ UniquePersistent<Object> resObject (isolate, args.This ());
125
125
126
126
res->onAborted ([p = std::move (p), resObject = std::move (resObject), isolate]() {
127
127
HandleScope hs (isolate);
@@ -132,7 +132,7 @@ struct HttpResponseWrapper {
132
132
CallJS (isolate, Local<Function>::New (isolate, p), 0 , nullptr );
133
133
});
134
134
135
- args.GetReturnValue ().Set (args.Holder ());
135
+ args.GetReturnValue ().Set (args.This ());
136
136
}
137
137
}
138
138
@@ -232,7 +232,7 @@ struct HttpResponseWrapper {
232
232
/* How important is this return? */
233
233
});
234
234
235
- args.GetReturnValue ().Set (args.Holder ());
235
+ args.GetReturnValue ().Set (args.This ());
236
236
}
237
237
}
238
238
@@ -249,7 +249,7 @@ struct HttpResponseWrapper {
249
249
assumeCorked ();
250
250
res->writeStatus (data.getString ());
251
251
252
- args.GetReturnValue ().Set (args.Holder ());
252
+ args.GetReturnValue ().Set (args.This ());
253
253
}
254
254
}
255
255
@@ -272,7 +272,7 @@ struct HttpResponseWrapper {
272
272
assumeCorked ();
273
273
res->endWithoutBody (reportedContentLength, closeConnection);
274
274
275
- args.GetReturnValue ().Set (args.Holder ());
275
+ args.GetReturnValue ().Set (args.This ());
276
276
}
277
277
}
278
278
@@ -296,7 +296,7 @@ struct HttpResponseWrapper {
296
296
assumeCorked ();
297
297
res->end (data.getString (), closeConnection);
298
298
299
- args.GetReturnValue ().Set (args.Holder ());
299
+ args.GetReturnValue ().Set (args.This ());
300
300
}
301
301
}
302
302
@@ -367,7 +367,7 @@ struct HttpResponseWrapper {
367
367
assumeCorked ();
368
368
res->writeHeader (header.getString (), value.getString ());
369
369
370
- args.GetReturnValue ().Set (args.Holder ());
370
+ args.GetReturnValue ().Set (args.This ());
371
371
}
372
372
}
373
373
@@ -385,7 +385,7 @@ struct HttpResponseWrapper {
385
385
insideCorkCallback--;
386
386
});
387
387
388
- args.GetReturnValue ().Set (args.Holder ());
388
+ args.GetReturnValue ().Set (args.This ());
389
389
}
390
390
}
391
391
0 commit comments