Changeset 186511 in webkit


Ignore:
Timestamp:
Jul 8, 2015 10:18:03 AM (9 years ago)
Author:
Antti Koivisto
Message:

Network Cache: Don't open files in main thread
https://bugs.webkit.org/show_bug.cgi?id=146722

Follow-up.

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::Storage::dispatchReadOperation):

Accessing m_bodyFilter is technically not thread safe so keep it in main thread.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r186510 r186511  
     12015-07-08  Antti Koivisto  <antti@apple.com>
     2
     3        Network Cache: Don't open files in main thread
     4        https://bugs.webkit.org/show_bug.cgi?id=146722
     5
     6        Follow-up.
     7
     8        * NetworkProcess/cache/NetworkCacheStorage.cpp:
     9        (WebKit::NetworkCache::Storage::dispatchReadOperation):
     10
     11            Accessing m_bodyFilter is technically not thread safe so keep it in main thread.
     12
    1132015-07-08  Antti Koivisto  <antti@apple.com>
    214
  • trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp

    r186510 r186511  
    486486    ASSERT(m_activeReadOperations.contains(&readOperation));
    487487
    488     ioQueue().dispatch([this, &readOperation] {
     488    bool shouldGetBodyBlob = !m_bodyFilter || m_bodyFilter->mayContain(readOperation.key.hash());
     489
     490    ioQueue().dispatch([this, &readOperation, shouldGetBodyBlob] {
    489491        auto recordPath = recordPathForKey(readOperation.key);
    490492
    491493        ++readOperation.activeCount;
    492 
    493         bool shouldGetBodyBlob = !m_bodyFilter || m_bodyFilter->mayContain(readOperation.key.hash());
    494494        if (shouldGetBodyBlob)
    495495            ++readOperation.activeCount;
Note: See TracChangeset for help on using the changeset viewer.