Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-06-25 19:46:33 +0300
committerAnna Henningsen <anna@addaleax.net>2018-06-30 16:52:54 +0300
commit64a3fadf7192485197b9695b7bb2165c7e7d762d (patch)
treec226390642b88585eebcb38899e7afb1f2fda75c /src/stream_base-inl.h
parenta078521a6a9cede03208216d58d5af13e8406cbe (diff)
src: remove StreamBase::kFlagHasWritev
Since libuv 1.21.0, pipes on Windows support `writev` on the libuv side. This allows for some simplification, and makes the `StreamBase` API more uniform (multi-buffer `Write()` is always supported now, including when used by other non-JS consumers like HTTP/2). PR-URL: https://github.com/nodejs/node/pull/21527 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/stream_base-inl.h')
-rw-r--r--src/stream_base-inl.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/stream_base-inl.h b/src/stream_base-inl.h
index bd451031737..027b938d30d 100644
--- a/src/stream_base-inl.h
+++ b/src/stream_base-inl.h
@@ -266,9 +266,7 @@ inline WriteWrap* StreamBase::CreateWriteWrap(
}
template <class Base>
-void StreamBase::AddMethods(Environment* env,
- Local<FunctionTemplate> t,
- int flags) {
+void StreamBase::AddMethods(Environment* env, Local<FunctionTemplate> t) {
HandleScope scope(env->isolate());
enum PropertyAttribute attributes =
@@ -325,8 +323,7 @@ void StreamBase::AddMethods(Environment* env,
env->SetProtoMethod(t, "readStart", JSMethod<Base, &StreamBase::ReadStartJS>);
env->SetProtoMethod(t, "readStop", JSMethod<Base, &StreamBase::ReadStopJS>);
env->SetProtoMethod(t, "shutdown", JSMethod<Base, &StreamBase::Shutdown>);
- if ((flags & kFlagHasWritev) != 0)
- env->SetProtoMethod(t, "writev", JSMethod<Base, &StreamBase::Writev>);
+ env->SetProtoMethod(t, "writev", JSMethod<Base, &StreamBase::Writev>);
env->SetProtoMethod(t,
"writeBuffer",
JSMethod<Base, &StreamBase::WriteBuffer>);