summaryrefslogtreecommitdiff
path: root/src/node_http2.cc
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2018-12-18 15:52:09 -0500
committerAnna Henningsen <anna@addaleax.net>2019-03-08 09:25:30 +0100
commit4697e1b0d792f50863bbbcad25a95b84e6746501 (patch)
treeec352361e56956176ca5831c092703d36cd929c6 /src/node_http2.cc
parent254635198ab1e6afed357c1884c1ef75eb3b8486 (diff)
downloadandroid-node-v8-4697e1b0d792f50863bbbcad25a95b84e6746501.tar.gz
android-node-v8-4697e1b0d792f50863bbbcad25a95b84e6746501.tar.bz2
android-node-v8-4697e1b0d792f50863bbbcad25a95b84e6746501.zip
src: remove templating from StreamBase
PR-URL: https://github.com/nodejs/node/pull/25142 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_http2.cc')
-rw-r--r--src/node_http2.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/node_http2.cc b/src/node_http2.cc
index 1857eb78b2..62e66620db 100644
--- a/src/node_http2.cc
+++ b/src/node_http2.cc
@@ -1868,6 +1868,7 @@ Http2Stream::Http2Stream(Http2Session* session,
id_(id),
current_headers_category_(category) {
MakeWeak();
+ StreamBase::AttachToObject(GetObject());
statistics_.start_time = uv_hrtime();
// Limit the number of header pairs
@@ -3008,9 +3009,9 @@ void Initialize(Local<Object> target,
env->SetProtoMethod(stream, "rstStream", Http2Stream::RstStream);
env->SetProtoMethod(stream, "refreshState", Http2Stream::RefreshState);
stream->Inherit(AsyncWrap::GetConstructorTemplate(env));
- StreamBase::AddMethods<Http2Stream>(env, stream);
+ StreamBase::AddMethods(env, stream);
Local<ObjectTemplate> streamt = stream->InstanceTemplate();
- streamt->SetInternalFieldCount(1);
+ streamt->SetInternalFieldCount(StreamBase::kStreamBaseField + 1);
env->set_http2stream_constructor_template(streamt);
target->Set(context,
FIXED_ONE_BYTE_STRING(env->isolate(), "Http2Stream"),