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:
authorDarshan Sen <darshan.sen@postman.com>2021-10-24 11:50:15 +0300
committerNode.js GitHub Bot <github-bot@iojs.org>2021-10-30 11:46:10 +0300
commitf8035ecbbd9f32ec5ae398495cd645f00c4b0c51 (patch)
tree9f3a22d84d7ded711383b617f8499d403ed5e9bd /src/node_http2.h
parentff536fa13e70a3e6874d662774a7ae726a558776 (diff)
src: remove usage of `AllocatedBuffer` from `node_http2`
Signed-off-by: Darshan Sen <darshan.sen@postman.com> PR-URL: https://github.com/nodejs/node/pull/40584 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/node_http2.h')
-rw-r--r--src/node_http2.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/node_http2.h b/src/node_http2.h
index 4d267e647d3..e3d4d70b2d1 100644
--- a/src/node_http2.h
+++ b/src/node_http2.h
@@ -8,7 +8,6 @@
#include "nghttp2/nghttp2.h"
#include "env.h"
-#include "allocated_buffer.h"
#include "aliased_struct.h"
#include "node_http2_state.h"
#include "node_http_common.h"
@@ -897,7 +896,7 @@ class Http2Session : public AsyncWrap,
// When processing input data, either stream_buf_ab_ or stream_buf_allocation_
// will be set. stream_buf_ab_ is lazily created from stream_buf_allocation_.
v8::Global<v8::ArrayBuffer> stream_buf_ab_;
- AllocatedBuffer stream_buf_allocation_;
+ std::unique_ptr<v8::BackingStore> stream_buf_allocation_;
size_t stream_buf_offset_ = 0;
// Custom error code for errors that originated inside one of the callbacks
// called by nghttp2_session_mem_recv.
@@ -1040,7 +1039,7 @@ class Origins {
~Origins() = default;
const nghttp2_origin_entry* operator*() const {
- return reinterpret_cast<const nghttp2_origin_entry*>(buf_.data());
+ return static_cast<const nghttp2_origin_entry*>(bs_->Data());
}
size_t length() const {
@@ -1049,7 +1048,7 @@ class Origins {
private:
size_t count_;
- AllocatedBuffer buf_;
+ std::unique_ptr<v8::BackingStore> bs_;
};
#define HTTP2_HIDDEN_CONSTANTS(V) \