Diff
Modified: branches/safari-601.1-branch/Source/WebKit2/ChangeLog (187077 => 187078)
--- branches/safari-601.1-branch/Source/WebKit2/ChangeLog 2015-07-21 04:37:51 UTC (rev 187077)
+++ branches/safari-601.1-branch/Source/WebKit2/ChangeLog 2015-07-21 04:37:53 UTC (rev 187078)
@@ -1,5 +1,26 @@
2015-07-20 Matthew Hanson <matthew_han...@apple.com>
+ Merge r187023. rdar://problem/21799011
+
+ 2015-07-16 Anders Carlsson <ander...@apple.com>
+
+ WebsiteDataStore operations need to grab background assertions
+ https://bugs.webkit.org/show_bug.cgi?id=147015
+ rdar://problem/21799011
+
+ Reviewed by Sam Weinig.
+
+ * UIProcess/Network/NetworkProcessProxy.cpp:
+ (WebKit::NetworkProcessProxy::fetchWebsiteData):
+ (WebKit::NetworkProcessProxy::deleteWebsiteData):
+ (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::fetchWebsiteData):
+ (WebKit::WebProcessProxy::deleteWebsiteData):
+ (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
+
+2015-07-20 Matthew Hanson <matthew_han...@apple.com>
+
Merge r187001. rdar://problem/21769577
2015-07-18 Simon Fraser <simon.fra...@apple.com>
Modified: branches/safari-601.1-branch/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp (187077 => 187078)
--- branches/safari-601.1-branch/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp 2015-07-21 04:37:51 UTC (rev 187077)
+++ branches/safari-601.1-branch/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp 2015-07-21 04:37:53 UTC (rev 187078)
@@ -125,16 +125,23 @@
ASSERT(canSendMessage());
uint64_t callbackID = generateCallbackID();
- m_pendingFetchWebsiteDataCallbacks.add(callbackID, WTF::move(completionHandler));
+ auto token = throttler().backgroundActivityToken();
+ m_pendingFetchWebsiteDataCallbacks.add(callbackID, [token, completionHandler](WebsiteData websiteData) {
+ completionHandler(WTF::move(websiteData));
+ });
+
send(Messages::WebProcess::FetchWebsiteData(sessionID, dataTypes, callbackID), 0);
}
void NetworkProcessProxy::deleteWebsiteData(WebCore::SessionID sessionID, WebsiteDataTypes dataTypes, std::chrono::system_clock::time_point modifiedSince, std::function<void ()> completionHandler)
{
auto callbackID = generateCallbackID();
+ auto token = throttler().backgroundActivityToken();
- m_pendingDeleteWebsiteDataCallbacks.add(callbackID, WTF::move(completionHandler));
+ m_pendingDeleteWebsiteDataCallbacks.add(callbackID, [token, completionHandler] {
+ completionHandler();
+ });
send(Messages::NetworkProcess::DeleteWebsiteData(sessionID, dataTypes, modifiedSince, callbackID), 0);
}
@@ -143,8 +150,12 @@
ASSERT(canSendMessage());
uint64_t callbackID = generateCallbackID();
- m_pendingDeleteWebsiteDataForOriginsCallbacks.add(callbackID, WTF::move(completionHandler));
+ auto token = throttler().backgroundActivityToken();
+ m_pendingDeleteWebsiteDataForOriginsCallbacks.add(callbackID, [token, completionHandler] {
+ completionHandler();
+ });
+
Vector<SecurityOriginData> originData;
for (auto& origin : origins)
originData.append(SecurityOriginData::fromSecurityOrigin(*origin));
Modified: branches/safari-601.1-branch/Source/WebKit2/UIProcess/WebProcessProxy.cpp (187077 => 187078)
--- branches/safari-601.1-branch/Source/WebKit2/UIProcess/WebProcessProxy.cpp 2015-07-21 04:37:51 UTC (rev 187077)
+++ branches/safari-601.1-branch/Source/WebKit2/UIProcess/WebProcessProxy.cpp 2015-07-21 04:37:53 UTC (rev 187078)
@@ -713,8 +713,12 @@
ASSERT(canSendMessage());
uint64_t callbackID = generateCallbackID();
- m_pendingFetchWebsiteDataCallbacks.add(callbackID, WTF::move(completionHandler));
+ auto token = throttler().backgroundActivityToken();
+ m_pendingFetchWebsiteDataCallbacks.add(callbackID, [token, completionHandler](WebsiteData websiteData) {
+ completionHandler(WTF::move(websiteData));
+ });
+
send(Messages::WebProcess::FetchWebsiteData(sessionID, dataTypes, callbackID), 0);
}
@@ -723,8 +727,11 @@
ASSERT(canSendMessage());
uint64_t callbackID = generateCallbackID();
+ auto token = throttler().backgroundActivityToken();
- m_pendingDeleteWebsiteDataCallbacks.add(callbackID, WTF::move(completionHandler));
+ m_pendingDeleteWebsiteDataCallbacks.add(callbackID, [token, completionHandler] {
+ completionHandler();
+ });
send(Messages::WebProcess::DeleteWebsiteData(sessionID, dataTypes, modifiedSince, callbackID), 0);
}
@@ -733,8 +740,12 @@
ASSERT(canSendMessage());
uint64_t callbackID = generateCallbackID();
- m_pendingDeleteWebsiteDataForOriginsCallbacks.add(callbackID, WTF::move(completionHandler));
+ auto token = throttler().backgroundActivityToken();
+ m_pendingDeleteWebsiteDataForOriginsCallbacks.add(callbackID, [token, completionHandler] {
+ completionHandler();
+ });
+
Vector<SecurityOriginData> originData;
for (auto& origin : origins)
originData.append(SecurityOriginData::fromSecurityOrigin(*origin));