@@ -82,10 +82,8 @@ void StreamBase::AfterShutdown(ShutdownWrap* req_wrap, int status) {
82
82
req_wrap_obj
83
83
};
84
84
85
- if (req_wrap->object ()->Has (env->context (),
86
- env->oncomplete_string ()).FromJust ()) {
85
+ if (req_wrap_obj->Has (env->context (), env->oncomplete_string ()).FromJust ())
87
86
req_wrap->MakeCallback (env->oncomplete_string (), arraysize (argv), argv);
88
- }
89
87
90
88
delete req_wrap;
91
89
}
@@ -172,9 +170,8 @@ int StreamBase::Writev(const FunctionCallbackInfo<Value>& args) {
172
170
173
171
int err = DoWrite (req_wrap, *bufs, count, nullptr );
174
172
175
- req_wrap->object ()->Set (env->async (), True (env->isolate ()));
176
- req_wrap->object ()->Set (env->bytes_string (),
177
- Number::New (env->isolate (), bytes));
173
+ req_wrap_obj->Set (env->async (), True (env->isolate ()));
174
+ req_wrap_obj->Set (env->bytes_string (), Number::New (env->isolate (), bytes));
178
175
const char * msg = Error ();
179
176
if (msg != nullptr ) {
180
177
req_wrap_obj->Set (env->error_string (), OneByteString (env->isolate (), msg));
@@ -328,7 +325,7 @@ int StreamBase::WriteString(const FunctionCallbackInfo<Value>& args) {
328
325
// Reference StreamWrap instance to prevent it from being garbage
329
326
// collected before `AfterWrite` is called.
330
327
CHECK_EQ (false , req_wrap->persistent ().IsEmpty ());
331
- req_wrap-> object () ->Set (env->handle_string (), send_handle_obj);
328
+ req_wrap_obj ->Set (env->handle_string (), send_handle_obj);
332
329
}
333
330
334
331
err = DoWrite (
@@ -338,7 +335,7 @@ int StreamBase::WriteString(const FunctionCallbackInfo<Value>& args) {
338
335
reinterpret_cast <uv_stream_t *>(send_handle));
339
336
}
340
337
341
- req_wrap-> object () ->Set (env->async (), True (env->isolate ()));
338
+ req_wrap_obj ->Set (env->async (), True (env->isolate ()));
342
339
343
340
if (err)
344
341
req_wrap->Dispose ();
@@ -383,10 +380,8 @@ void StreamBase::AfterWrite(WriteWrap* req_wrap, int status) {
383
380
wrap->ClearError ();
384
381
}
385
382
386
- if (req_wrap->object ()->Has (env->context (),
387
- env->oncomplete_string ()).FromJust ()) {
383
+ if (req_wrap_obj->Has (env->context (), env->oncomplete_string ()).FromJust ())
388
384
req_wrap->MakeCallback (env->oncomplete_string (), arraysize (argv), argv);
389
- }
390
385
391
386
req_wrap->Dispose ();
392
387
}
0 commit comments