Changeset 245297 in webkit


Ignore:
Timestamp:
May 14, 2019 12:32:17 PM (5 years ago)
Author:
Chris Dumez
Message:

The network process tries to take a process assertion when NetworkProcess::processWillSuspendImminently() is called
https://bugs.webkit.org/show_bug.cgi?id=197888

Reviewed by Geoffrey Garen.

When actualPrepareToSuspend() in the Network process is called set the 'IsSuspended' flag on the SQLite database tracker and unset
the flag when the process resume. This is consistent with what we already do in the WebProcess and makes sure that
the network process does not try and take on a new assertion due to locked files when getting notified it is about to get
suspended.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::actualPrepareToSuspend):
(WebKit::NetworkProcess::processWillSuspendImminently):
(WebKit::NetworkProcess::resume):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r245294 r245297  
     12019-05-14  Chris Dumez  <cdumez@apple.com>
     2
     3        The network process tries to take a process assertion when NetworkProcess::processWillSuspendImminently() is called
     4        https://bugs.webkit.org/show_bug.cgi?id=197888
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        When actualPrepareToSuspend() in the Network process is called set the 'IsSuspended' flag on the SQLite database tracker and unset
     9        the flag when the process resume. This is consistent with what we already do in the WebProcess and makes sure that
     10        the network process does not try and take on a new assertion due to locked files when getting notified it is about to get
     11        suspended.
     12
     13        * NetworkProcess/NetworkProcess.cpp:
     14        (WebKit::NetworkProcess::actualPrepareToSuspend):
     15        (WebKit::NetworkProcess::processWillSuspendImminently):
     16        (WebKit::NetworkProcess::resume):
     17
    1182019-05-14  Chris Dumez  <cdumez@apple.com>
    219
  • trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp

    r245149 r245297  
    19231923void NetworkProcess::actualPrepareToSuspend(ShouldAcknowledgeWhenReadyToSuspend shouldAcknowledgeWhenReadyToSuspend)
    19241924{
     1925#if PLATFORM(IOS_FAMILY)
     1926    m_webSQLiteDatabaseTracker.setIsSuspended(true);
     1927#endif
     1928
    19251929    lowMemoryHandler(Critical::Yes);
    19261930
     
    19481952void NetworkProcess::processWillSuspendImminently(CompletionHandler<void(bool)>&& completionHandler)
    19491953{
     1954    RELEASE_LOG(ProcessSuspension, "%p - NetworkProcess::processWillSuspendImminently()", this);
    19501955#if PLATFORM(IOS_FAMILY) && ENABLE(INDEXED_DATABASE)
    19511956    for (auto& server : m_idbServers.values())
     
    19952000void NetworkProcess::resume()
    19962001{
     2002#if PLATFORM(IOS_FAMILY)
     2003    m_webSQLiteDatabaseTracker.setIsSuspended(false);
     2004#endif
     2005
    19972006    platformProcessDidResume();
    19982007    for (auto& connection : m_webProcessConnections)
Note: See TracChangeset for help on using the changeset viewer.