aboutsummaryrefslogtreecommitdiff
path: root/src/node_http2.cc
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-03-19 18:18:22 +0100
committerAnna Henningsen <anna@addaleax.net>2019-03-26 14:48:56 +0100
commit3018441304697fe801fc81385229b5a78a62cc54 (patch)
tree22d9083a71267574f34a2913a59fe13c6bc564a7 /src/node_http2.cc
parent53ebd3311d4e0ef184a062b2f657ac69dc8a7acf (diff)
downloadandroid-node-v8-3018441304697fe801fc81385229b5a78a62cc54.tar.gz
android-node-v8-3018441304697fe801fc81385229b5a78a62cc54.tar.bz2
android-node-v8-3018441304697fe801fc81385229b5a78a62cc54.zip
src: store onread callback in internal field
This gives a slight performance improvement. At 2000 runs: confidence improvement accuracy (*) (**) (***) net/net-c2s.js dur=5 type='buf' len=64 *** 0.54 % ±0.16% ±0.21% ±0.27% PR-URL: https://github.com/nodejs/node/pull/26837 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src/node_http2.cc')
-rw-r--r--src/node_http2.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_http2.cc b/src/node_http2.cc
index cbf3519488..b2666f1c8b 100644
--- a/src/node_http2.cc
+++ b/src/node_http2.cc
@@ -3011,7 +3011,7 @@ void Initialize(Local<Object> target,
stream->Inherit(AsyncWrap::GetConstructorTemplate(env));
StreamBase::AddMethods(env, stream);
Local<ObjectTemplate> streamt = stream->InstanceTemplate();
- streamt->SetInternalFieldCount(StreamBase::kStreamBaseField + 1);
+ streamt->SetInternalFieldCount(StreamBase::kStreamBaseFieldCount);
env->set_http2stream_constructor_template(streamt);
target->Set(context,
FIXED_ONE_BYTE_STRING(env->isolate(), "Http2Stream"),