Make sure cookies get flushed to disk before exiting or suspending the network process
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Aug 2018 23:45:44 +0000 (23:45 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Aug 2018 23:45:44 +0000 (23:45 +0000)
commit1a5c16cf276376afffcf6357cebf38c33d3a1016
tree92214b19cbf799096a9640dfe3489f5d100874b2
parentdbec1125307678e7148c072ffdf6fd9991ba024b
Make sure cookies get flushed to disk before exiting or suspending the network process
https://bugs.webkit.org/show_bug.cgi?id=188241
<rdar://problem/42831831>

Reviewed by Alex Christensen and Geoffrey Garen.

Make sure cookies get flushed to disk before exiting or suspending the network process,
to make sure they do not get lost.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::didClose):
(WebKit::NetworkProcess::actualPrepareToSuspend):
(WebKit::NetworkProcess::platformSyncAllCookies):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::syncAllCookies):
(WebKit::NetworkProcess::platformSyncAllCookies):
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::didClose):
(WebKit::callExitNow):
(WebKit::callExitSoon):
(WebKit::ChildProcess::initialize):
(WebKit::didCloseOnConnectionWorkQueue): Deleted.
* Shared/ChildProcess.h:
(WebKit::ChildProcess::shouldCallExitWhenConnectionIsClosed const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/NetworkProcess.cpp
Source/WebKit/NetworkProcess/NetworkProcess.h
Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm
Source/WebKit/Shared/ChildProcess.cpp
Source/WebKit/Shared/ChildProcess.h