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>2019-03-08 11:47:45 +0300
committerDaniel Bevenius <daniel.bevenius@gmail.com>2019-03-11 11:32:40 +0300
commit560466c7738c1b66f2a74381bff41bdd7bde1eef (patch)
treeb3178025cb4fa519b34bb273e987d02d62ec2c24 /src/node_http2.cc
parenta445244a0c7e25e9b3dcfa48f622ce51f5815dcd (diff)
lib,src: remove usage of _externalStream
Since 4697e1b0d792f50863bbbcad25a95b84e6746501, it is no longer necessary to use `v8::External`s to pass `StreamBase` instances to native functions. PR-URL: https://github.com/nodejs/node/pull/26510 Refs: https://github.com/nodejs/node/pull/25142 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_http2.cc')
-rw-r--r--src/node_http2.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/node_http2.cc b/src/node_http2.cc
index 62e66620dbb..cbf35194881 100644
--- a/src/node_http2.cc
+++ b/src/node_http2.cc
@@ -1837,8 +1837,8 @@ bool Http2Session::HasWritesOnSocketForStream(Http2Stream* stream) {
// (typically a net.Socket or tls.TLSSocket). The lifecycle of the two is
// tightly coupled with all data transfer between the two happening at the
// C++ layer via the StreamBase API.
-void Http2Session::Consume(Local<External> external) {
- StreamBase* stream = static_cast<StreamBase*>(external->Value());
+void Http2Session::Consume(Local<Object> stream_obj) {
+ StreamBase* stream = StreamBase::FromObject(stream_obj);
stream->PushStreamListener(this);
Debug(this, "i/o stream consumed");
}
@@ -2429,8 +2429,8 @@ void Http2Session::New(const FunctionCallbackInfo<Value>& args) {
void Http2Session::Consume(const FunctionCallbackInfo<Value>& args) {
Http2Session* session;
ASSIGN_OR_RETURN_UNWRAP(&session, args.Holder());
- CHECK(args[0]->IsExternal());
- session->Consume(args[0].As<External>());
+ CHECK(args[0]->IsObject());
+ session->Consume(args[0].As<Object>());
}
// Destroys the Http2Session instance and renders it unusable