Changeset 139931 in webkit


Ignore:
Timestamp:
Jan 16, 2013, 3:23:57 PM (12 years ago)
Author:
ap@apple.com
Message:

WebProcess should not access ~/Library/Caches/com.apple.WebProcess
https://bugs.webkit.org/show_bug.cgi?id=107055

Reviewed by Anders Carlsson.

  • WebProcess/com.apple.WebProcess.sb.in: Remove the rule allowing access.
  • WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): Use a correct cache directory even if NetworkProcess is in use. Not all loading has moved to this process yet.
Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r139919 r139931  
     12013-01-16  Alexey Proskuryakov  <ap@apple.com>
     2
     3        WebProcess should not access ~/Library/Caches/com.apple.WebProcess
     4        https://bugs.webkit.org/show_bug.cgi?id=107055
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * WebProcess/com.apple.WebProcess.sb.in: Remove the rule allowing access.
     9
     10        * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess):
     11        Use a correct cache directory even if NetworkProcess is in use. Not all loading has
     12        moved to this process yet.
     13
    1142013-01-16  Anders Carlsson  <andersca@apple.com>
    215
  • trunk/Source/WebKit2/WebProcess/com.apple.WebProcess.sb.in

    r139685 r139931  
    9090;; Writable preferences and temporary files
    9191(allow file*
    92        (home-subpath "/Library/Caches/com.apple.WebProcess")
    9392       (home-regex #"/Library/Preferences/ByHost/com\.apple\.HIToolbox\.")
    9493       (home-regex #"/Library/Preferences/com\.apple\.WebProcess\.")
  • trunk/Source/WebKit2/WebProcess/mac/WebProcessMac.mm

    r139066 r139931  
    274274    SandboxExtension::consumePermanently(parameters.diskCacheDirectoryExtensionHandle);
    275275
    276 #if ENABLE(NETWORK_PROCESS)
    277     if (!parameters.usesNetworkProcess) {
    278 #endif
    279         if (!parameters.diskCacheDirectory.isNull()) {
    280             NSUInteger cacheMemoryCapacity = parameters.nsURLCacheMemoryCapacity;
    281             NSUInteger cacheDiskCapacity = parameters.nsURLCacheDiskCapacity;
    282 
    283             RetainPtr<NSURLCache> parentProcessURLCache(AdoptNS, [[NSURLCache alloc] initWithMemoryCapacity:cacheMemoryCapacity diskCapacity:cacheDiskCapacity diskPath:parameters.diskCacheDirectory]);
    284             [NSURLCache setSharedURLCache:parentProcessURLCache.get()];
    285         }
    286 #if ENABLE(NETWORK_PROCESS)
    287     }
    288 #endif
     276    // FIXME (NetworkProcess): This should not be necessary once all loading is in NetworkProcess.
     277    if (!parameters.diskCacheDirectory.isNull()) {
     278        NSUInteger cacheMemoryCapacity = parameters.nsURLCacheMemoryCapacity;
     279        NSUInteger cacheDiskCapacity = parameters.nsURLCacheDiskCapacity;
     280
     281        RetainPtr<NSURLCache> parentProcessURLCache(AdoptNS, [[NSURLCache alloc] initWithMemoryCapacity:cacheMemoryCapacity diskCapacity:cacheDiskCapacity diskPath:parameters.diskCacheDirectory]);
     282        [NSURLCache setSharedURLCache:parentProcessURLCache.get()];
     283    }
    289284
    290285    m_shouldForceScreenFontSubstitution = parameters.shouldForceScreenFontSubstitution;
Note: See TracChangeset for help on using the changeset viewer.