Take additional process assertion while downloading.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Feb 2019 01:27:23 +0000 (01:27 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Feb 2019 01:27:23 +0000 (01:27 +0000)
commit7fe3e60414fc4792e6bfec8fb8e05faef2c052e0
treef63d35056ef0a985fd60b1a8772dbe698bfc3b37
parentf567daadbbfeec8d9c3467633de0e7d598e6b4be
Take additional process assertion while downloading.
<rdar://problem/47741356> and https://bugs.webkit.org/show_bug.cgi?id=194239

Reviewed by Chris Dumez.

When the first download starts, grab this new assertion.
When the last download ends, release it.

* Configurations/Network-iOS.entitlements:

* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::dataTaskBecameDownloadTask):
(WebKit::DownloadManager::downloadFinished):
* NetworkProcess/Downloads/DownloadManager.h:

* Platform/spi/ios/AssertionServicesSPI.h:

* UIProcess/ProcessAssertion.cpp:
(WebKit::ProcessAssertion::ProcessAssertion):
* UIProcess/ProcessAssertion.h:
(WebKit::ProcessAssertion::ProcessAssertion):

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didSetAssertionState):

* UIProcess/ios/ProcessAssertionIOS.mm:
(WebKit::flagsForState):
(WebKit::reasonForState):
(WebKit::ProcessAssertion::ProcessAssertion):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/Configurations/Network-iOS.entitlements
Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp
Source/WebKit/NetworkProcess/Downloads/DownloadManager.h
Source/WebKit/Platform/spi/ios/AssertionServicesSPI.h
Source/WebKit/UIProcess/ProcessAssertion.cpp
Source/WebKit/UIProcess/ProcessAssertion.h
Source/WebKit/UIProcess/WebProcessProxy.cpp
Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm