summaryrefslogtreecommitdiff
path: root/src/node_http2.h
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-01-30 18:43:05 +0100
committerAnna Henningsen <anna@addaleax.net>2019-02-08 21:03:54 +0100
commit730a27df40e3f7c0ea7c85bfd0dbf9e913f2f432 (patch)
tree048588e7764044747e72e527d901178132ce1571 /src/node_http2.h
parent03908d270d602b525f0051ddc5a648c021a04f9a (diff)
downloadandroid-node-v8-730a27df40e3f7c0ea7c85bfd0dbf9e913f2f432.tar.gz
android-node-v8-730a27df40e3f7c0ea7c85bfd0dbf9e913f2f432.tar.bz2
android-node-v8-730a27df40e3f7c0ea7c85bfd0dbf9e913f2f432.zip
src: pass along errors from http2 object creation
PR-URL: https://github.com/nodejs/node/pull/25822 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'src/node_http2.h')
-rw-r--r--src/node_http2.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/node_http2.h b/src/node_http2.h
index e6953f6fc1..fb90e3ed85 100644
--- a/src/node_http2.h
+++ b/src/node_http2.h
@@ -451,10 +451,11 @@ class Http2StreamListener : public StreamListener {
class Http2Stream : public AsyncWrap,
public StreamBase {
public:
- Http2Stream(Http2Session* session,
- int32_t id,
- nghttp2_headers_category category = NGHTTP2_HCAT_HEADERS,
- int options = 0);
+ static Http2Stream* New(
+ Http2Session* session,
+ int32_t id,
+ nghttp2_headers_category category = NGHTTP2_HCAT_HEADERS,
+ int options = 0);
~Http2Stream() override;
nghttp2_stream* operator*();
@@ -611,6 +612,12 @@ class Http2Stream : public AsyncWrap,
Statistics statistics_ = {};
private:
+ Http2Stream(Http2Session* session,
+ v8::Local<v8::Object> obj,
+ int32_t id,
+ nghttp2_headers_category category,
+ int options);
+
Http2Session* session_ = nullptr; // The Parent HTTP/2 Session
int32_t id_ = 0; // The Stream Identifier
int32_t code_ = NGHTTP2_NO_ERROR; // The RST_STREAM code (if any)
@@ -1076,7 +1083,7 @@ class Http2StreamPerformanceEntry : public PerformanceEntry {
class Http2Session::Http2Ping : public AsyncWrap {
public:
- explicit Http2Ping(Http2Session* session);
+ explicit Http2Ping(Http2Session* session, v8::Local<v8::Object> obj);
void MemoryInfo(MemoryTracker* tracker) const override {
tracker->TrackField("session", session_);
@@ -1100,8 +1107,10 @@ class Http2Session::Http2Ping : public AsyncWrap {
// structs.
class Http2Session::Http2Settings : public AsyncWrap {
public:
- explicit Http2Settings(Environment* env);
- explicit Http2Settings(Http2Session* session);
+ Http2Settings(Environment* env,
+ Http2Session* session,
+ v8::Local<v8::Object> obj,
+ uint64_t start_time = uv_hrtime());
void MemoryInfo(MemoryTracker* tracker) const override {
tracker->TrackField("session", session_);
@@ -1125,7 +1134,6 @@ class Http2Session::Http2Settings : public AsyncWrap {
get_setting fn);
private:
- Http2Settings(Environment* env, Http2Session* session, uint64_t start_time);
void Init();
Http2Session* session_;
uint64_t startTime_;