Changeset 173255 in webkit


Ignore:
Timestamp:
Sep 4, 2014 12:41:27 AM (10 years ago)
Author:
Carlos Garcia Campos
Message:

Initialize m_usesNetworkProcess earlier in WebProcess::initializeWebProcess()
https://bugs.webkit.org/show_bug.cgi?id=136478

Reviewed by Alexey Proskuryakov.

The soup network backend uses WebProcess::usesNetworkProcess()
from WebProcess::platformSetCacheModel() and
WebProcess::platformInitializeWebProcess(), both called before the
m_usesNetworkProcess member has been initialized.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess): Move the
m_usesNetworkProcess initialization at the beginning right before
calling platformInitializeWebProcess().

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformSetCacheModel): Remove the early
return when using the network process, since this was dead code
before this change, and not really needed now that
usesNetworkProcess() will return true.
(WebKit::WebProcess::platformInitializeWebProcess): Remove comment
that is not accurate since r171156.

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r173252 r173255  
     12014-09-04  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        Initialize m_usesNetworkProcess earlier in WebProcess::initializeWebProcess()
     4        https://bugs.webkit.org/show_bug.cgi?id=136478
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        The soup network backend uses WebProcess::usesNetworkProcess()
     9        from WebProcess::platformSetCacheModel() and
     10        WebProcess::platformInitializeWebProcess(), both called before the
     11        m_usesNetworkProcess member has been initialized.
     12
     13        * WebProcess/WebProcess.cpp:
     14        (WebKit::WebProcess::initializeWebProcess): Move the
     15        m_usesNetworkProcess initialization at the beginning right before
     16        calling platformInitializeWebProcess().
     17        * WebProcess/cocoa/WebProcessCocoa.mm:
     18        (WebKit::WebProcess::platformSetCacheModel): Remove the early
     19        return when using the network process, since this was dead code
     20        before this change, and not really needed now that
     21        usesNetworkProcess() will return true.
     22        (WebKit::WebProcess::platformInitializeWebProcess): Remove comment
     23        that is not accurate since r171156.
     24
    1252014-09-03  Michael Catanzaro  <mcatanzaro@igalia.com>
    226
  • trunk/Source/WebKit2/WebProcess/WebProcess.cpp

    r172790 r173255  
    272272    ASSERT(m_pageMap.isEmpty());
    273273
     274#if ENABLE(NETWORK_PROCESS)
     275    m_usesNetworkProcess = parameters.usesNetworkProcess;
     276#endif
     277
    274278    platformInitializeWebProcess(parameters, decoder);
    275279
     
    349353
    350354#if ENABLE(NETWORK_PROCESS)
    351     m_usesNetworkProcess = parameters.usesNetworkProcess;
    352355    ensureNetworkProcessConnection();
    353356
  • trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm

    r172500 r173255  
    121121    NSURLCache *nsurlCache = [NSURLCache sharedURLCache];
    122122
    123     // FIXME: Once there is no loading being done in the WebProcess, we should remove this,
    124     // as calling [NSURLCache sharedURLCache] initializes the cache, which we would rather not do.
    125     if (usesNetworkProcess()) {
    126         [nsurlCache setMemoryCapacity:0];
    127         [nsurlCache setDiskCapacity:0];
    128         return;
    129     }
    130 
    131123    [nsurlCache setMemoryCapacity:urlCacheMemoryCapacity];
    132124    [nsurlCache setDiskCapacity:std::max<unsigned long>(urlCacheDiskCapacity, [nsurlCache diskCapacity])]; // Don't shrink a big disk cache, since that would cause churn.
     
    176168#endif
    177169
    178     // When the network process is enabled, each web process wants a stand-alone
    179     // NSURLCache, which it can disable to save memory.
    180170#if PLATFORM(IOS)
    181171    if (!parameters.uiProcessBundleIdentifier.isNull()) {
Note: See TracChangeset for help on using the changeset viewer.