Changeset 249723 in webkit


Ignore:
Timestamp:
Sep 10, 2019 11:14:15 AM (5 years ago)
Author:
Chris Dumez
Message:

Hangs on Swiss.com due to the web process being blocked on StorageAreaMap::LoadValuesIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=201644
<rdar://problem/54942761>

Reviewed by Geoffrey Garen.

Mark the StorageManagerSet::GetValues sync IPC from the WebContent process to the Network
process with a UnboundedSynchronousIPCScope so that it will process critical sync IPC
from the UIProcess (such as WebPage::GetPositionInformation) while waiting for a reply.

  • WebProcess/WebStorage/StorageAreaMap.cpp:

(WebKit::StorageAreaMap::loadValuesIfNeeded):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r249720 r249723  
     12019-09-10  Chris Dumez  <cdumez@apple.com>
     2
     3        Hangs on Swiss.com due to the web process being blocked on StorageAreaMap::LoadValuesIfNeeded
     4        https://bugs.webkit.org/show_bug.cgi?id=201644
     5        <rdar://problem/54942761>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        Mark the StorageManagerSet::GetValues sync IPC from the WebContent process to the Network
     10        process with a UnboundedSynchronousIPCScope so that it will process critical sync IPC
     11        from the UIProcess (such as WebPage::GetPositionInformation) while waiting for a reply.
     12
     13        * WebProcess/WebStorage/StorageAreaMap.cpp:
     14        (WebKit::StorageAreaMap::loadValuesIfNeeded):
     15
    1162019-09-10  David Quesada  <david_quesada@apple.com>
    217
  • trunk/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.cpp

    r248901 r249723  
    161161        return;
    162162
     163    // The StorageManagerSet::GetValues() IPC may be very slow because it may need to fetch the values from disk and there may be a lot
     164    // of data.
     165    IPC::UnboundedSynchronousIPCScope unboundedSynchronousIPCScope;
     166
    163167    HashMap<String, String> values;
    164     // FIXME: This should use a special sendSync flag to indicate that we don't want to process incoming messages while waiting for a reply.
    165     // (This flag does not yet exist). Since loadValuesIfNeeded() ends up being called from within JavaScript code, processing incoming synchronous messages
    166     // could lead to weird reentrency bugs otherwise.
    167168    WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::StorageManagerSet::GetValues(*m_storageMapID), Messages::StorageManagerSet::GetValues::Reply(values), 0);
    168169
Note: See TracChangeset for help on using the changeset viewer.