Title: [292119] trunk
- Revision
- 292119
- Author
- [email protected]
- Date
- 2022-03-30 13:51:38 -0700 (Wed, 30 Mar 2022)
Log Message
Avoid initializing default WKWebsiteDataStore in -[WKWebViewConfiguration copyWithZone]
https://bugs.webkit.org/show_bug.cgi?id=238531
rdar://90628101
Reviewed by Tim Horton.
Source/WebKit:
API test: WKWebsiteDataStore.DoNotCreateDefaultDataStore
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
Tools:
* TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:
(TestWebKitAPI::TEST):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (292118 => 292119)
--- trunk/Source/WebKit/ChangeLog 2022-03-30 20:41:54 UTC (rev 292118)
+++ trunk/Source/WebKit/ChangeLog 2022-03-30 20:51:38 UTC (rev 292119)
@@ -1,3 +1,18 @@
+2022-03-30 Sihui Liu <[email protected]>
+
+ Avoid initializing default WKWebsiteDataStore in -[WKWebViewConfiguration copyWithZone]
+ https://bugs.webkit.org/show_bug.cgi?id=238531
+ rdar://90628101
+
+ Reviewed by Tim Horton.
+
+ API test: WKWebsiteDataStore.DoNotCreateDefaultDataStore
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _initializeWithConfiguration:]):
+ * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+ (-[WKWebViewConfiguration copyWithZone:]):
+
2022-03-30 Youenn Fablet <[email protected]>
Implement persistent notification handling
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (292118 => 292119)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2022-03-30 20:41:54 UTC (rev 292118)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2022-03-30 20:51:38 UTC (rev 292119)
@@ -335,6 +335,8 @@
if (!configuration)
[NSException raise:NSInvalidArgumentException format:@"Configuration cannot be nil"];
+ if (!configuration.websiteDataStore)
+ [NSException raise:NSInvalidArgumentException format:@"Configuration websiteDataStore cannot be nil"];
_configuration = adoptNS([configuration copy]);
if (WKWebView *relatedWebView = [_configuration _relatedWebView]) {
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (292118 => 292119)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm 2022-03-30 20:41:54 UTC (rev 292118)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm 2022-03-30 20:51:38 UTC (rev 292119)
@@ -380,6 +380,8 @@
configuration.processPool = self.processPool;
configuration.preferences = self.preferences;
configuration.userContentController = self.userContentController;
+ if (self._websiteDataStoreIfExists)
+ [configuration setWebsiteDataStore:self._websiteDataStoreIfExists];
configuration.websiteDataStore = self.websiteDataStore;
configuration.defaultWebpagePreferences = self.defaultWebpagePreferences;
configuration._visitedLinkStore = self._visitedLinkStore;
Modified: trunk/Tools/ChangeLog (292118 => 292119)
--- trunk/Tools/ChangeLog 2022-03-30 20:41:54 UTC (rev 292118)
+++ trunk/Tools/ChangeLog 2022-03-30 20:51:38 UTC (rev 292119)
@@ -1,3 +1,14 @@
+2022-03-30 Sihui Liu <[email protected]>
+
+ Avoid initializing default WKWebsiteDataStore in -[WKWebViewConfiguration copyWithZone]
+ https://bugs.webkit.org/show_bug.cgi?id=238531
+ rdar://90628101
+
+ Reviewed by Tim Horton.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:
+ (TestWebKitAPI::TEST):
+
2022-03-30 Carlos Alberto Lopez Perez <[email protected]>
[GTK][WPE] generate-bundle: self-contained bundle for the MiniBrowser that can work on any distro
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm (292118 => 292119)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm 2022-03-30 20:41:54 UTC (rev 292118)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm 2022-03-30 20:51:38 UTC (rev 292119)
@@ -413,4 +413,11 @@
[webView synchronouslyLoadRequest:[NSURLRequest requestWithURL:url]];
}
+TEST(WKWebsiteDataStore, DoNotCreateDefaultDataStore)
+{
+ auto configuration = adoptNS([WKWebViewConfiguration new]);
+ [configuration.get() copy];
+ EXPECT_FALSE([WKWebsiteDataStore _defaultDataStoreExists]);
+}
+
} // namespace TestWebKitAPI
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes