зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1604851, r=dragana
No need to optimize one lock here since telemetry tells us only 1 out of 1m request with alt-svc https://searchfox.org/mozilla-central/rev/b243debf6235b050b42fd2eb615fdc729636ca6b/netwerk/protocol/http/nsHttpChannel.cpp#6670 Differential Revision: https://phabricator.services.mozilla.com/D57925 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
f271f11c2c
Коммит
a92a02a283
|
@ -294,6 +294,8 @@ nsHttpHandler::nsHttpHandler()
|
|||
mNextChannelId(1),
|
||||
mLastActiveTabLoadOptimizationLock(
|
||||
"nsHttpConnectionMgr::LastActiveTabLoadOptimization"),
|
||||
mSpdyBlacklistLock(
|
||||
"nsHttpHandler::SpdyBlacklist"),
|
||||
mThroughCaptivePortal(false) {
|
||||
LOG(("Creating nsHttpHandler [this=%p].\n", this));
|
||||
|
||||
|
@ -2669,11 +2671,17 @@ bool nsHttpHandler::IsBeforeLastActiveTabLoadOptimization(
|
|||
}
|
||||
|
||||
void nsHttpHandler::BlacklistSpdy(const nsHttpConnectionInfo* ci) {
|
||||
MOZ_ASSERT(OnSocketThread(), "not on socket thread");
|
||||
|
||||
mConnMgr->BlacklistSpdy(ci);
|
||||
mBlacklistedSpdyOrigins.PutEntry(ci->GetOrigin());
|
||||
if (!mBlacklistedSpdyOrigins.Contains(ci->GetOrigin())) {
|
||||
MutexAutoLock lock(mSpdyBlacklistLock);
|
||||
mBlacklistedSpdyOrigins.PutEntry(ci->GetOrigin());
|
||||
}
|
||||
}
|
||||
|
||||
bool nsHttpHandler::IsSpdyBlacklisted(const nsHttpConnectionInfo* ci) {
|
||||
MutexAutoLock lock(mSpdyBlacklistLock);
|
||||
return mBlacklistedSpdyOrigins.Contains(ci->GetOrigin());
|
||||
}
|
||||
|
||||
|
|
|
@ -771,6 +771,7 @@ class nsHttpHandler final : public nsIHttpProtocolHandler,
|
|||
Mutex mLastActiveTabLoadOptimizationLock;
|
||||
TimeStamp mLastActiveTabLoadOptimizationHit;
|
||||
|
||||
Mutex mSpdyBlacklistLock;
|
||||
public:
|
||||
MOZ_MUST_USE nsresult NewChannelId(uint64_t& channelId);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче