Changeset 252500 in webkit


Ignore:
Timestamp:
Nov 15, 2019 1:51:52 PM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Add SPI to clear web process cache
https://bugs.webkit.org/show_bug.cgi?id=204210

Patch by Benjamin Nham <Ben Nham> on 2019-11-15
Reviewed by Chris Dumez.

This adds an SPI to clear cached web processes. The intended use case is to add a lukewarm mode to
Mac PLT5 in which web pages load in a new WebProcess and load resources from the disk cache.

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _clearWebProcessCache]):

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

(-[WKProcessPool _clearWebProcessCache]):

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r252499 r252500  
     12019-11-15  Benjamin Nham  <nham@apple.com>
     2
     3        Add SPI to clear web process cache
     4        https://bugs.webkit.org/show_bug.cgi?id=204210
     5
     6        Reviewed by Chris Dumez.
     7
     8        This adds an SPI to clear cached web processes. The intended use case is to add a lukewarm mode to
     9        Mac PLT5 in which web pages load in a new WebProcess and load resources from the disk cache.
     10
     11        * UIProcess/API/Cocoa/WKProcessPool.mm:
     12        (-[WKProcessPool _clearWebProcessCache]):
     13        * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
     14        (-[WKProcessPool _clearWebProcessCache]):
     15
    1162019-11-15  Per Arne Vollan  <pvollan@apple.com>
    217
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm

    r252014 r252500  
    470470}
    471471
     472- (void)_clearWebProcessCache
     473{
     474    _processPool->webProcessCache().clear();
     475}
     476
    472477- (size_t)_webProcessCount
    473478{
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h

    r252174 r252500  
    112112- (NSUInteger)_processCacheCapacity WK_API_AVAILABLE(macos(10.14.4), ios(12.2));
    113113- (NSUInteger)_processCacheSize WK_API_AVAILABLE(macos(10.15), ios(13.0));
     114- (void)_clearWebProcessCache WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
    114115- (void)_setUseSeparateServiceWorkerProcess:(BOOL)forceServiceWorkerProcess WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
    115116
Note: See TracChangeset for help on using the changeset viewer.