Skip to content

Commit 4eeab84

Browse files
committed
quic: Fix cosmetic problems after review
1 parent e390b1a commit 4eeab84

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

src/quic/session.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,18 +1402,11 @@ bool Session::is_destroyed_or_closing() const {
14021402

14031403
void Session::Close(CloseMethod method) {
14041404
if (is_destroyed()) return;
1405-
// auto& stats_ = impl_->stats_;
14061405

14071406
if (impl_->last_error_) {
14081407
Debug(this, "Closing with error: %s", impl_->last_error_);
14091408
}
14101409

1411-
// This is done already in the implmentation
1412-
// STAT_RECORD_TIMESTAMP(Stats, closing_at);
1413-
// The next line would prevent,
1414-
// that close of the implementation is executed!
1415-
// impl_->state_->closing = 1;
1416-
14171410
// With both the DEFAULT and SILENT options, we will proceed to closing
14181411
// the session immediately. All open streams will be immediately destroyed
14191412
// with whatever is set as the last error. The session will then be destroyed
@@ -1467,9 +1460,6 @@ void Session::FinishClose() {
14671460
// and as a result of, Close()
14681461
// being called first.
14691462
DCHECK(!is_destroyed());
1470-
// The next line does not make sense, as in the implementation
1471-
// is also checking if closing is not in progress
1472-
// DCHECK(impl_->state_->closing);
14731463

14741464
// If impl_->Close() returns true, then the session can be destroyed
14751465
// immediately without round-tripping through JavaScript.

src/quic/streams.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
namespace node {
1919

20-
using quic::BindingData;
2120
using v8::Array;
2221
using v8::ArrayBuffer;
2322
using v8::ArrayBufferView;
@@ -31,6 +30,7 @@ using v8::Maybe;
3130
using v8::Nothing;
3231
using v8::Object;
3332
using v8::ObjectTemplate;
33+
using v8::Promise;
3434
using v8::SharedArrayBuffer;
3535
using v8::TypedArray;
3636
using v8::Uint8Array;
@@ -1462,6 +1462,7 @@ JS_METHOD_IMPL(DataQueueFeeder::AddFakePull) {
14621462
feeder->tryWakePulls();
14631463
}
14641464

1465+
using quic::BindingData;
14651466
JS_CONSTRUCTOR_IMPL(DataQueueFeeder, dataqueuefeeder_constructor_template, {
14661467
auto isolate = env->isolate();
14671468
JS_NEW_CONSTRUCTOR();

src/quic/streams.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
namespace node {
1919

20-
using v8::Global;
21-
using v8::Promise;
2220
namespace quic {
2321

2422
class Session;
@@ -407,7 +405,7 @@ class DataQueueFeeder final : public AsyncWrap {
407405

408406
void tryWakePulls() {
409407
if (!readFinish_.IsEmpty()) {
410-
Local<Promise::Resolver> resolver = readFinish_.Get(env()->isolate());
408+
v8::Local<v8::Promise::Resolver> resolver = readFinish_.Get(env()->isolate());
411409
// I do not think, that this can error...
412410
[[maybe_unused]] v8::Maybe<bool> ignoredResult =
413411
resolver->Resolve(env()->context(), v8::True(env()->isolate()));
@@ -426,7 +424,7 @@ class DataQueueFeeder final : public AsyncWrap {
426424
pending.next(bob::STATUS_EOS, nullptr, 0, [](uint64_t) {});
427425
}
428426
if (!readFinish_.IsEmpty()) {
429-
Local<Promise::Resolver> resolver = readFinish_.Get(env()->isolate());
427+
Local<v8::Promise::Resolver> resolver = readFinish_.Get(env()->isolate());
430428
[[maybe_unused]] v8::Maybe<bool> ignoredResult =
431429
resolver->Resolve(env()->context(), v8::False(env()->isolate()));
432430
readFinish_.Reset();
@@ -458,7 +456,7 @@ class DataQueueFeeder final : public AsyncWrap {
458456

459457
private:
460458
std::shared_ptr<DataQueue> dataQueue_;
461-
Global<Promise::Resolver> readFinish_;
459+
v8::Global<v8::Promise::Resolver> readFinish_;
462460

463461
std::deque<PendingPull> pendingPulls_;
464462
bool done = false;

0 commit comments

Comments
 (0)