Skip to content

stream info: prefer reference rather than shared pointer for virtualhost()#44046

Merged
wbpcode merged 2 commits into
envoyproxy:mainfrom
wbpcode:dev-make-stream-info-vhost-better
Mar 24, 2026
Merged

stream info: prefer reference rather than shared pointer for virtualhost()#44046
wbpcode merged 2 commits into
envoyproxy:mainfrom
wbpcode:dev-make-stream-info-vhost-better

Conversation

@wbpcode
Copy link
Copy Markdown
Member

@wbpcode wbpcode commented Mar 20, 2026

Commit Message: stream info: prefer reference rather than shared pointer for virtualhost()
Additional Description:

See #44025 for our new style.

Risk Level: n/a.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.

…ost()

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
@wbpcode
Copy link
Copy Markdown
Member Author

wbpcode commented Mar 20, 2026

/retest

ggreenway
ggreenway previously approved these changes Mar 20, 2026

const Router::VirtualHostConstSharedPtr& virtualHost() const override { return vhost_; }
OptRef<const Router::VirtualHost> virtualHost() const override {
return makeOptRefFromPtr<const Router::VirtualHost>(vhost_.get());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe OptRef should have a constructor for shared_ptr<T> to remove some boilerplate? Or maybe makeOptRefFromPtr should take the shared_ptr? Then we could remove the .get(). Just an idea; not required.

Comment thread test/common/http/conn_manager_impl_test_2.cc Outdated
Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
@wbpcode
Copy link
Copy Markdown
Member Author

wbpcode commented Mar 21, 2026

/retest

@wbpcode wbpcode merged commit 0479b39 into envoyproxy:main Mar 24, 2026
31 of 33 checks passed
@wbpcode wbpcode deleted the dev-make-stream-info-vhost-better branch March 24, 2026 02:21
fishcakez pushed a commit to fishcakez/envoy that referenced this pull request Mar 25, 2026
…ost() (envoyproxy#44046)

Commit Message: stream info: prefer reference rather than shared pointer
for virtualhost()
Additional Description:

See envoyproxy#44025 for our new style.

Risk Level: n/a.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
TAOXUY pushed a commit to TAOXUY/envoy that referenced this pull request Apr 1, 2026
…ost() (envoyproxy#44046)

Commit Message: stream info: prefer reference rather than shared pointer
for virtualhost()
Additional Description:

See envoyproxy#44025 for our new style.

Risk Level: n/a.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Xuyang Tao <taoxuy@google.com>
citrus7 pushed a commit to citrus7/envoy that referenced this pull request Apr 1, 2026
…ost() (envoyproxy#44046)

Commit Message: stream info: prefer reference rather than shared pointer
for virtualhost()
Additional Description:

See envoyproxy#44025 for our new style.

Risk Level: n/a.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Jonathan Wu <jtwu@google.com>
nshipilov pushed a commit to nshipilov/envoy that referenced this pull request Apr 13, 2026
…ost() (envoyproxy#44046)

Commit Message: stream info: prefer reference rather than shared pointer
for virtualhost()
Additional Description:

See envoyproxy#44025 for our new style.

Risk Level: n/a.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Signed-off-by: Nick Shipilov <nick.shipilov.n@gmail.com>
krinkinmu pushed a commit to grnmeira/envoy that referenced this pull request Apr 20, 2026
…ost() (envoyproxy#44046)

Commit Message: stream info: prefer reference rather than shared pointer
for virtualhost()
Additional Description:

See envoyproxy#44025 for our new style.

Risk Level: n/a.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.

---------

Signed-off-by: wbpcode/wangbaiping <wbphub@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants