diff --git a/lib/internal/wrap_js_stream.js b/lib/internal/wrap_js_stream.js index 73196fd0a2baee..611095655b5a65 100644 --- a/lib/internal/wrap_js_stream.js +++ b/lib/internal/wrap_js_stream.js @@ -136,7 +136,6 @@ class JSStreamWrap extends Socket { if (!self._dequeue(item)) return; - handle.doAfterWrite(req); handle.finishWrite(req, errCode); }); } @@ -196,7 +195,6 @@ class JSStreamWrap extends Socket { const errCode = uv.UV_ECANCELED; if (item.type === 'write') { - handle.doAfterWrite(req); handle.finishWrite(req, errCode); } else if (item.type === 'shutdown') { handle.finishShutdown(req, errCode); diff --git a/src/js_stream.cc b/src/js_stream.cc index 739d59df133d29..c4e32feeba0f7d 100644 --- a/src/js_stream.cc +++ b/src/js_stream.cc @@ -169,17 +169,6 @@ void JSStream::New(const FunctionCallbackInfo& args) { } -void JSStream::DoAfterWrite(const FunctionCallbackInfo& args) { - JSStream* wrap; - CHECK(args[0]->IsObject()); - WriteWrap* w; - ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder()); - ASSIGN_OR_RETURN_UNWRAP(&w, args[0].As()); - - w->Done(0); -} - - template void JSStream::Finish(const FunctionCallbackInfo& args) { Wrap* w; @@ -234,7 +223,6 @@ void JSStream::Initialize(Local target, AsyncWrap::AddWrapMethods(env, t); - env->SetProtoMethod(t, "doAfterWrite", DoAfterWrite); env->SetProtoMethod(t, "finishWrite", Finish); env->SetProtoMethod(t, "finishShutdown", Finish); env->SetProtoMethod(t, "readBuffer", ReadBuffer); diff --git a/src/js_stream.h b/src/js_stream.h index c7caf79374d538..338cbe545630f1 100644 --- a/src/js_stream.h +++ b/src/js_stream.h @@ -37,7 +37,6 @@ class JSStream : public AsyncWrap, public StreamBase { AsyncWrap* GetAsyncWrap() override; static void New(const v8::FunctionCallbackInfo& args); - static void DoAfterWrite(const v8::FunctionCallbackInfo& args); static void ReadBuffer(const v8::FunctionCallbackInfo& args); static void EmitEOF(const v8::FunctionCallbackInfo& args);