[tbb-commits] [tor-browser] 212/311: Bug 1759506 - Avoid crashing if mReservedClientInfo already has something, r=edenchuang a=pascalc
gitolite role
git at cupani.torproject.org
Tue Apr 26 15:30:12 UTC 2022
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch geckoview-99.0.1-11.0-1
in repository tor-browser.
commit 05b639b7ec6bf049ff38bfa568c85edbcef967b4
Author: Kershaw Chang <kershaw at mozilla.com>
AuthorDate: Wed Mar 16 20:05:59 2022 +0000
Bug 1759506 - Avoid crashing if mReservedClientInfo already has something, r=edenchuang a=pascalc
Differential Revision: https://phabricator.services.mozilla.com/D141262
---
netwerk/base/LoadInfo.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/netwerk/base/LoadInfo.cpp b/netwerk/base/LoadInfo.cpp
index da5881d190a66..f3c52234b1335 100644
--- a/netwerk/base/LoadInfo.cpp
+++ b/netwerk/base/LoadInfo.cpp
@@ -1840,9 +1840,12 @@ void LoadInfo::SetReservedClientInfo(const ClientInfo& aClientInfo) {
MOZ_DIAGNOSTIC_ASSERT(mInitialClientInfo.isNothing());
// Treat assignments of the same value as a no-op. The emplace below
// will normally assert when overwriting an existing value.
- if (mReservedClientInfo.isSome() &&
- mReservedClientInfo.ref() == aClientInfo) {
- return;
+ if (mReservedClientInfo.isSome()) {
+ if (mReservedClientInfo.ref() == aClientInfo) {
+ return;
+ }
+ MOZ_DIAGNOSTIC_ASSERT(false, "mReservedClientInfo already set");
+ mReservedClientInfo.reset();
}
mReservedClientInfo.emplace(aClientInfo);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the tbb-commits
mailing list