browser(webkit): unfork web process cache (#15021)

Web process leak was fixed upstream by WebKit/WebKit@364ed4f and our workaround is no longer needed.

Pretty-diff: yury-s/WebKit@a1a66a5
This commit is contained in:
Yury Semikhatsky 2022-06-21 13:47:29 -07:00 коммит произвёл GitHub
Родитель 6af6fab84a
Коммит c8e4e737a7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 12 добавлений и 27 удалений

Просмотреть файл

@ -1,2 +1,2 @@
1668
Changed: lushnikov@chromium.org Tue Jun 21 12:50:53 MSK 2022
1669
Changed: yurys@chromium.org Tue 21 Jun 2022 12:39:05 PM PDT

Просмотреть файл

@ -2224,7 +2224,7 @@ diff --git a/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm b/So
index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d768ace22 100644
--- a/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm
+++ b/Source/WebCore/Modules/speech/cocoa/WebSpeechRecognizerTask.mm
@@ -198,6 +198,7 @@ NS_ASSUME_NONNULL_BEGIN
@@ -198,6 +198,7 @@ - (void)sendEndIfNeeded
- (void)speechRecognizer:(SFSpeechRecognizer *)speechRecognizer availabilityDidChange:(BOOL)available
{
@ -2232,7 +2232,7 @@ index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d
ASSERT(isMainThread());
if (available || !_task)
@@ -211,6 +212,7 @@ NS_ASSUME_NONNULL_BEGIN
@@ -211,6 +212,7 @@ - (void)speechRecognizer:(SFSpeechRecognizer *)speechRecognizer availabilityDidC
- (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didHypothesizeTranscription:(SFTranscription *)transcription
{
@ -2240,7 +2240,7 @@ index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d
ASSERT(isMainThread());
[self sendSpeechStartIfNeeded];
@@ -219,6 +221,7 @@ NS_ASSUME_NONNULL_BEGIN
@@ -219,6 +221,7 @@ - (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didHypothesizeTran
- (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didFinishRecognition:(SFSpeechRecognitionResult *)recognitionResult
{
@ -2248,7 +2248,7 @@ index a941d76a4f748718df1e3cff2a6c5e0827f48891..f62db5a27ac0e4c12430e7d19e60c83d
ASSERT(isMainThread());
[self callbackWithTranscriptions:recognitionResult.transcriptions isFinal:YES];
@@ -230,6 +233,7 @@ NS_ASSUME_NONNULL_BEGIN
@@ -230,6 +233,7 @@ - (void)speechRecognitionTask:(SFSpeechRecognitionTask *)task didFinishRecogniti
- (void)speechRecognitionTaskWasCancelled:(SFSpeechRecognitionTask *)task
{
@ -8918,7 +8918,7 @@ diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm b/Source/
index 8b32817b6c0efbcbd221dc7a3ebe420b42d8b51d..a468653cffcfaca8824e94d628c48b7b5d61e164 100644
--- a/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
@@ -720,7 +720,7 @@ void NetworkSessionCocoa::setClientAuditToken(const WebCore::AuthenticationChall
@@ -720,7 +720,7 @@ - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didRece
if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
sessionCocoa->setClientAuditToken(challenge);
@ -10328,7 +10328,7 @@ index b8bf936e2eb8ca4dc0f445099dfb899395950bdb..30a2af76de0daac450c7afbb8a2dfe81
#import <WebCore/Credential.h>
#import <WebCore/RegistrationDatabase.h>
#import <WebCore/ServiceWorkerClientData.h>
@@ -234,6 +235,11 @@ static WallTime toSystemClockTime(NSDate *date)
@@ -234,6 +235,11 @@ - (void)removeDataOfTypes:(NSSet *)dataTypes modifiedSince:(NSDate *)date comple
});
}
@ -10507,7 +10507,7 @@ diff --git a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm b/
index 2e235bb880c638a0e74256b6d66cb0244ea0a3f1..3471eebb47e860f7c2071d0e7f2691c9f0a6355d 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
@@ -257,6 +257,16 @@
@@ -257,6 +257,16 @@ - (BOOL)processSwapsOnNavigation
return _processPoolConfiguration->processSwapsOnNavigation();
}
@ -17210,21 +17210,6 @@ index bc758641100c9ab2bb70c878f7a10a6db198cf01..fa3764f7c417363a0da953552fb9b6ff
#if ENABLE(DRAG_SUPPORT)
DidPerformDragOperation(bool handled)
#endif
diff --git a/Source/WebKit/UIProcess/WebProcessCache.cpp b/Source/WebKit/UIProcess/WebProcessCache.cpp
index d18d9e197f8a366cd5efeaa63600bec4e7f1d9d6..3c9db1f1cb5523923ec010f935d883932daa5f1a 100644
--- a/Source/WebKit/UIProcess/WebProcessCache.cpp
+++ b/Source/WebKit/UIProcess/WebProcessCache.cpp
@@ -81,6 +81,10 @@ bool WebProcessCache::canCacheProcess(WebProcessProxy& process) const
return false;
}
+ auto sessionID = process.websiteDataStore()->sessionID();
+ if (sessionID.isEphemeral() && !process.processPool().hasPagesUsingWebsiteDataStore(*process.websiteDataStore()))
+ return false;
+
return true;
}
diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp
index 5593029e4f27efc9140ead901d1cc2646d8e9785..7221d3f5d792adc756305a397ca3f652cc2b97fe 100644
--- a/Source/WebKit/UIProcess/WebProcessPool.cpp
@ -20754,7 +20739,7 @@ diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegac
index 5fa2c59e5e93bc923d37ae5bb751e2f4d7fe68ee..73378254b62a7ec61b3efc3fd46aadaf45d55601 100644
--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
@@ -4189,7 +4189,7 @@ static BOOL currentScrollIsBlit(NSView *clipView)
@@ -4189,7 +4189,7 @@ - (void)mouseDown:(WebEvent *)event
_private->handlingMouseDownEvent = NO;
}
@ -20767,7 +20752,7 @@ diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/ma
index 59cecf9242ab834dadc904ef295365e1476f47f9..ca4cc96e62df62e92c22c3535f5972cc1fdc4cba 100644
--- a/Source/WebKitLegacy/mac/WebView/WebView.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm
@@ -4039,7 +4039,7 @@ IGNORE_WARNINGS_END
@@ -4039,7 +4039,7 @@ + (void)_doNotStartObservingNetworkReachability
}
#endif // PLATFORM(IOS_FAMILY)
@ -20776,7 +20761,7 @@ index 59cecf9242ab834dadc904ef295365e1476f47f9..ca4cc96e62df62e92c22c3535f5972cc
- (NSArray *)_touchEventRegions
{
@@ -4081,7 +4081,7 @@ IGNORE_WARNINGS_END
@@ -4081,7 +4081,7 @@ - (NSArray *)_touchEventRegions
}).autorelease();
}