Changeset 171156 in webkit


Ignore:
Timestamp:
Jul 16, 2014 4:08:26 PM (10 years ago)
Author:
ap@apple.com
Message:

<rdar://problem/17669097> REGRESSION (r170155): Sandbox violations using a wrong
CFNetwork cache path in WebContent process

Rubber-stamped by Sam Weinig.

Before r170155, we incorrectly checked usesNetworkProcess(), which always returns
false at this point in initialization sequence. But we did the right thing, as we
always need to set the cache path, even when network process is used for most loading.

  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):
Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r171155 r171156  
     12014-07-16  Alexey Proskuryakov  <ap@apple.com>
     2
     3        <rdar://problem/17669097> REGRESSION (r170155): Sandbox violations using a wrong
     4        CFNetwork cache path in WebContent process
     5
     6        Rubber-stamped by Sam Weinig.
     7
     8        Before r170155, we incorrectly checked usesNetworkProcess(), which always returns
     9        false at this point in initialization sequence. But we did the right thing, as we
     10        always need to set the cache path, even when network process is used for most loading.
     11
     12        * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):
     13
    1142014-07-16  Timothy Horton  <timothy_horton@apple.com>
    215
  • trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm

    r171024 r171156  
    175175    // When the network process is enabled, each web process wants a stand-alone
    176176    // NSURLCache, which it can disable to save memory.
    177     if (!parameters.usesNetworkProcess) {
    178177#if PLATFORM(IOS)
    179         if (!parameters.uiProcessBundleIdentifier.isNull()) {
    180             [NSURLCache setSharedURLCache:adoptNS([[NSURLCache alloc]
    181                 _initWithMemoryCapacity:parameters.nsURLCacheMemoryCapacity
    182                 diskCapacity:parameters.nsURLCacheDiskCapacity
    183                 relativePath:parameters.uiProcessBundleIdentifier]).get()];
    184         }
     178    if (!parameters.uiProcessBundleIdentifier.isNull()) {
     179        [NSURLCache setSharedURLCache:adoptNS([[NSURLCache alloc]
     180            _initWithMemoryCapacity:parameters.nsURLCacheMemoryCapacity
     181            diskCapacity:parameters.nsURLCacheDiskCapacity
     182            relativePath:parameters.uiProcessBundleIdentifier]).get()];
     183    }
    185184#else
    186         if (!parameters.diskCacheDirectory.isNull()) {
    187             [NSURLCache setSharedURLCache:adoptNS([[NSURLCache alloc]
    188                 initWithMemoryCapacity:parameters.nsURLCacheMemoryCapacity
    189                 diskCapacity:parameters.nsURLCacheDiskCapacity
    190                 diskPath:parameters.diskCacheDirectory]).get()];
    191         }
    192 #endif
    193     }
     185    if (!parameters.diskCacheDirectory.isNull()) {
     186        [NSURLCache setSharedURLCache:adoptNS([[NSURLCache alloc]
     187            initWithMemoryCapacity:parameters.nsURLCacheMemoryCapacity
     188            diskCapacity:parameters.nsURLCacheDiskCapacity
     189            diskPath:parameters.diskCacheDirectory]).get()];
     190    }
     191#endif
    194192
    195193    m_compositingRenderServerPort = parameters.acceleratedCompositingPort.port();
Note: See TracChangeset for help on using the changeset viewer.