chore: update browser patches as of July, 25th, 2024 (#32468)
This commit is contained in:
Родитель
29f1541b14
Коммит
895d017fb8
|
@ -1,3 +1,3 @@
|
|||
REMOTE_URL="https://github.com/mozilla/gecko-dev"
|
||||
BASE_BRANCH="release"
|
||||
BASE_REVISION="4c9a3f8e2db68ae0a8fcf6bbf0574e3c0549ff49"
|
||||
BASE_REVISION="cf0397e3ba298868fdca53f894da5b0d239dc09e"
|
||||
|
|
|
@ -602,6 +602,8 @@ class NetworkObserver {
|
|||
proxyFilter.onProxyFilterResult(defaultProxyInfo);
|
||||
return;
|
||||
}
|
||||
if (this._targetRegistry.shouldBustHTTPAuthCacheForProxy(proxy))
|
||||
Services.obs.notifyObservers(null, "net:clear-active-logins");
|
||||
proxyFilter.onProxyFilterResult(protocolProxyService.newProxyInfo(
|
||||
proxy.type,
|
||||
proxy.host,
|
||||
|
|
|
@ -116,6 +116,7 @@ class TargetRegistry {
|
|||
this._browserToTarget = new Map();
|
||||
this._browserIdToTarget = new Map();
|
||||
|
||||
this._proxiesWithClashingAuthCacheKeys = new Set();
|
||||
this._browserProxy = null;
|
||||
|
||||
// Cleanup containers from previous runs (if any)
|
||||
|
@ -234,12 +235,50 @@ class TargetRegistry {
|
|||
onOpenWindow(win);
|
||||
}
|
||||
|
||||
// Firefox uses nsHttpAuthCache to cache authentication to the proxy.
|
||||
// If we're provided with a single proxy with a multiple different authentications, then
|
||||
// we should clear the nsHttpAuthCache on every request.
|
||||
shouldBustHTTPAuthCacheForProxy(proxy) {
|
||||
return this._proxiesWithClashingAuthCacheKeys.has(proxy);
|
||||
}
|
||||
|
||||
_updateProxiesWithSameAuthCacheAndDifferentCredentials() {
|
||||
const proxyIdToCredentials = new Map();
|
||||
const allProxies = [...this._browserContextIdToBrowserContext.values()].map(bc => bc._proxy).filter(Boolean);
|
||||
if (this._browserProxy)
|
||||
allProxies.push(this._browserProxy);
|
||||
const proxyAuthCacheKeyAndProxy = allProxies.map(proxy => [
|
||||
JSON.stringify({
|
||||
type: proxy.type,
|
||||
host: proxy.host,
|
||||
port: proxy.port,
|
||||
}),
|
||||
proxy,
|
||||
]);
|
||||
this._proxiesWithClashingAuthCacheKeys.clear();
|
||||
|
||||
proxyAuthCacheKeyAndProxy.sort(([cacheKey1], [cacheKey2]) => cacheKey1 < cacheKey2 ? -1 : 1);
|
||||
for (let i = 0; i < proxyAuthCacheKeyAndProxy.length - 1; ++i) {
|
||||
const [cacheKey1, proxy1] = proxyAuthCacheKeyAndProxy[i];
|
||||
const [cacheKey2, proxy2] = proxyAuthCacheKeyAndProxy[i + 1];
|
||||
if (cacheKey1 !== cacheKey2)
|
||||
continue;
|
||||
if (proxy1.username === proxy2.username && proxy1.password === proxy2.password)
|
||||
continue;
|
||||
// `proxy1` and `proxy2` have the same caching key, but serve different credentials.
|
||||
// We have to bust HTTP Auth Cache everytime there's a request that will use either of the proxies.
|
||||
this._proxiesWithClashingAuthCacheKeys.add(proxy1);
|
||||
this._proxiesWithClashingAuthCacheKeys.add(proxy2);
|
||||
}
|
||||
}
|
||||
|
||||
async cancelDownload(options) {
|
||||
this._downloadInterceptor.cancelDownload(options.uuid);
|
||||
}
|
||||
|
||||
setBrowserProxy(proxy) {
|
||||
this._browserProxy = proxy;
|
||||
this._updateProxiesWithSameAuthCacheAndDifferentCredentials();
|
||||
}
|
||||
|
||||
getProxyInfo(channel) {
|
||||
|
@ -906,12 +945,14 @@ class BrowserContext {
|
|||
}
|
||||
this._registry._browserContextIdToBrowserContext.delete(this.browserContextId);
|
||||
this._registry._userContextIdToBrowserContext.delete(this.userContextId);
|
||||
this._registry._updateProxiesWithSameAuthCacheAndDifferentCredentials();
|
||||
}
|
||||
|
||||
setProxy(proxy) {
|
||||
// Clear AuthCache.
|
||||
Services.obs.notifyObservers(null, "net:clear-active-logins");
|
||||
this._proxy = proxy;
|
||||
this._registry._updateProxiesWithSameAuthCacheAndDifferentCredentials();
|
||||
}
|
||||
|
||||
setIgnoreHTTPSErrors(ignoreHTTPSErrors) {
|
||||
|
|
|
@ -70,7 +70,7 @@ class JugglerFrameChild extends JSWindowActorChild {
|
|||
|
||||
const agents = topBrowingContextToAgents.get(this.browsingContext);
|
||||
// The agents are already re-bound to a new actor.
|
||||
if (agents.actor !== this)
|
||||
if (agents?.actor !== this)
|
||||
return;
|
||||
|
||||
topBrowingContextToAgents.delete(this.browsingContext);
|
||||
|
|
|
@ -129,7 +129,7 @@ class nsScreencastService::Session : public rtc::VideoSinkInterface<webrtc::Vide
|
|||
capability.height = 960;
|
||||
capability.maxFPS = ScreencastEncoder::fps;
|
||||
capability.videoType = webrtc::VideoType::kI420;
|
||||
int error = mCaptureModule->StartCapture(capability);
|
||||
int error = mCaptureModule->StartCaptureCounted(capability);
|
||||
if (error) {
|
||||
fprintf(stderr, "StartCapture error %d\n", error);
|
||||
return false;
|
||||
|
@ -152,7 +152,7 @@ class nsScreencastService::Session : public rtc::VideoSinkInterface<webrtc::Vide
|
|||
mCaptureModule->DeRegisterCaptureDataCallback(this);
|
||||
else
|
||||
mCaptureModule->DeRegisterRawFrameCallback(this);
|
||||
mCaptureModule->StopCapture();
|
||||
mCaptureModule->StopCaptureCounted();
|
||||
if (mEncoder) {
|
||||
mEncoder->finish([this, protect = RefPtr{this}] {
|
||||
NS_DispatchToMainThread(NS_NewRunnableFunction(
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,3 +1,3 @@
|
|||
REMOTE_URL="https://github.com/WebKit/WebKit.git"
|
||||
BASE_BRANCH="main"
|
||||
BASE_REVISION="a47deb713746fa2f228e8450a52ed0ecafc5309d"
|
||||
BASE_REVISION="f371dbc2bb4292037ed394e2162150a16ef977fc"
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче