Title: [233659] trunk/Source/WebKit
- Revision
- 233659
- Author
- [email protected]
- Date
- 2018-07-09 14:56:51 -0700 (Mon, 09 Jul 2018)
Log Message
WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData() fails to protect the page in its lambda
https://bugs.webkit.org/show_bug.cgi?id=187478
<rdar://problem/41975998>
Reviewed by Youenn Fablet.
Make sure we protect the WebPageProxy when we capture it in the lambda or it might go away by the
time the lambda gets called.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (233658 => 233659)
--- trunk/Source/WebKit/ChangeLog 2018-07-09 21:55:48 UTC (rev 233658)
+++ trunk/Source/WebKit/ChangeLog 2018-07-09 21:56:51 UTC (rev 233659)
@@ -1,3 +1,17 @@
+2018-07-09 Chris Dumez <[email protected]>
+
+ WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData() fails to protect the page in its lambda
+ https://bugs.webkit.org/show_bug.cgi?id=187478
+ <rdar://problem/41975998>
+
+ Reviewed by Youenn Fablet.
+
+ Make sure we protect the WebPageProxy when we capture it in the lambda or it might go away by the
+ time the lambda gets called.
+
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData):
+
2018-07-09 Basuke Suzuki <[email protected]>
[Curl] Remove unused AuthenticationManager static methods.
Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp (233658 => 233659)
--- trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp 2018-07-09 21:55:48 UTC (rev 233658)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp 2018-07-09 21:56:51 UTC (rev 233659)
@@ -348,18 +348,18 @@
RefPtr<CallbackAggregator> callbackAggregator = adoptRef(new CallbackAggregator(WTFMove(completionHandler)));
HashSet<PAL::SessionID> visitedSessionIDs;
- for (auto& page : globalPageMap()) {
- auto& dataStore = page.value->websiteDataStore();
+ for (auto& page : globalPageMap().values()) {
+ auto& dataStore = page->websiteDataStore();
if (!dataStore.isPersistent() || visitedSessionIDs.contains(dataStore.sessionID()))
continue;
visitedSessionIDs.add(dataStore.sessionID());
callbackAggregator->addPendingCallback();
- dataStore.topPrivatelyControlledDomainsWithWebsiteData(dataTypes, { }, [callbackAggregator, shouldNotifyPage, page](HashSet<String>&& domainsWithDataRecords) {
+ dataStore.topPrivatelyControlledDomainsWithWebsiteData(dataTypes, { }, [callbackAggregator, shouldNotifyPage, page = makeRef(*page)](HashSet<String>&& domainsWithDataRecords) {
// When completing the task, we should be getting called on the main thread.
ASSERT(RunLoop::isMain());
if (shouldNotifyPage)
- page.value->postMessageToInjectedBundle("WebsiteDataScanForTopPrivatelyControlledDomainsFinished", nullptr);
+ page->postMessageToInjectedBundle("WebsiteDataScanForTopPrivatelyControlledDomainsFinished", nullptr);
callbackAggregator->addDomainsWithDeletedWebsiteData(WTFMove(domainsWithDataRecords));
callbackAggregator->removePendingCallback();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes