-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
build: switch to C++23 #61132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
targos
wants to merge
1
commit into
nodejs:main
Choose a base branch
from
targos:c++23
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
build: switch to C++23 #61132
+5
−5
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Following Chromium. Closes: nodejs#61125 Refs: https://issues.chromium.org/issues/388070065
Collaborator
|
Review requested:
|
Open
Member
Author
|
Shows an error in quic code (@jasnell): |
Member
Author
|
I opened ngtcp2/ngtcp2#1970 for the ngtcp2 error. |
lpinca
approved these changes
Dec 22, 2025
Contributor
|
temporary workaround. Aside from this, there are no other problems, and it compiles successfully. diff --git a/src/quic/streams.h b/src/quic/streams.h
index c230815d78e..3c9fb100219 100644
--- a/src/quic/streams.h
+++ b/src/quic/streams.h
@@ -292,7 +292,12 @@ class Stream final : public AsyncWrap,
struct PendingHeaders;
class Outbound;
-
+
+
+ struct OutboundDeleter {
+ void operator() (Outbound* ptr) const;
+ };
+
// Gets a reader for the data received for this stream from the peer,
BaseObjectPtr<Blob::Reader> get_reader();
@@ -335,7 +340,7 @@ class Stream final : public AsyncWrap,
AliasedStruct<Stats> stats_;
AliasedStruct<State> state_;
BaseObjectWeakPtr<Session> session_;
- std::unique_ptr<Outbound> outbound_;
+ std::unique_ptr<Outbound, OutboundDeleter> outbound_;
std::shared_ptr<DataQueue> inbound_;
// If the stream cannot be opened yet, it will be created in a pending state.
diff --git a/src/quic/streams.cc b/src/quic/streams.cc
index 8fe5b72ce1f..8fa9c264c4f 100644
--- a/src/quic/streams.cc
+++ b/src/quic/streams.cc
@@ -739,6 +739,11 @@ class Stream::Outbound final : public MemoryRetainer {
size_t uncommitted_ = 0;
};
+
+void Stream::OutboundDeleter::operator() (Stream::Outbound* ptr) const {
+ delete ptr;
+}
+
// ============================================================================
#define V(name, key, no_side_effect) \
@@ -1038,7 +1043,7 @@ void Stream::set_outbound(std::shared_ptr<DataQueue> source) {
if (!source || !is_writable()) return;
Debug(this, "Setting the outbound data source");
DCHECK_NULL(outbound_);
- outbound_ = std::make_unique<Outbound>(this, std::move(source));
+ outbound_ = std::unique_ptr<Outbound, OutboundDeleter>(new Outbound(this, std::move(source)));
state_->has_outbound = 1;
if (!is_pending()) session_->ResumeStream(id());
}
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following Chromium.
Closes: #61125
Refs: https://issues.chromium.org/issues/388070065