Skip to content

Commit 1071883

Browse files
hanidamlajmeta-codesync[bot]
authored andcommitted
remove noexcept decls from ::getSingleOrEmpty
Summary: some weird heisenbug was triggered by these noexcept decls (see post for details) Reviewed By: afrind Differential Revision: D89935248 fbshipit-source-id: 62ee8ba78d452ea8be09c82a2338e84c55c8cc36
1 parent 5352379 commit 1071883

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

third-party/proxygen/src/proxygen/lib/http/HTTPHeaders.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,12 +364,11 @@ HTTPHeaders::SingleOrNullptrResult HTTPHeaders::getSingleOrNullptr(
364364
return res;
365365
}
366366

367-
const std::string& HTTPHeaders::getSingleOrEmpty(
368-
HTTPHeaderCode code) const noexcept {
367+
const std::string& HTTPHeaders::getSingleOrEmpty(HTTPHeaderCode code) const {
369368
return *getSingleOrNullptr(code);
370369
}
371370
const std::string& HTTPHeaders::getSingleOrEmpty(
372-
folly::StringPiece name) const noexcept {
371+
folly::StringPiece name) const {
373372
return *getSingleOrNullptr(name);
374373
}
375374

third-party/proxygen/src/proxygen/lib/http/HTTPHeaders.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,9 @@ class HTTPHeaders {
254254
* only value under the given name. If either of these is violated, returns
255255
* empty_string.
256256
*/
257+
[[nodiscard]] const std::string& getSingleOrEmpty(HTTPHeaderCode code) const;
257258
[[nodiscard]] const std::string& getSingleOrEmpty(
258-
HTTPHeaderCode code) const noexcept;
259-
[[nodiscard]] const std::string& getSingleOrEmpty(
260-
folly::StringPiece name) const noexcept;
259+
folly::StringPiece name) const;
261260
[[nodiscard]] const std::string rawGet(const std::string& header) const {
262261
return getSingleOrEmpty(header);
263262
}

0 commit comments

Comments
 (0)