Changeset 228723 in webkit


Ignore:
Timestamp:
Feb 19, 2018 6:12:04 PM (6 years ago)
Author:
beidson@apple.com
Message:

Add WebProcessPool option for process swapping on navigation.
https://bugs.webkit.org/show_bug.cgi?id=182945

Reviewed by Alex Christensen.

Just the most basic groundwork for testing a new WK2 feature.

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/C/WKContextConfigurationRef.cpp:

(WKContextConfigurationProcessSwapsOnNavigation):
(WKContextConfigurationSetProcessSwapsOnNavigation):

  • UIProcess/API/C/WKContextConfigurationRef.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration setProcessSwapsOnNavigation:]):
(-[_WKProcessPoolConfiguration processSwapsOnNavigation]):

Location:
trunk/Source/WebKit
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r228713 r228723  
     12018-02-19  Brady Eidson  <beidson@apple.com>
     2
     3        Add WebProcessPool option for process swapping on navigation.
     4        https://bugs.webkit.org/show_bug.cgi?id=182945
     5
     6        Reviewed by Alex Christensen.
     7
     8        Just the most basic groundwork for testing a new WK2 feature.
     9
     10        * UIProcess/API/APIProcessPoolConfiguration.h:
     11
     12        * UIProcess/API/C/WKContextConfigurationRef.cpp:
     13        (WKContextConfigurationProcessSwapsOnNavigation):
     14        (WKContextConfigurationSetProcessSwapsOnNavigation):
     15        * UIProcess/API/C/WKContextConfigurationRef.h:
     16
     17        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
     18        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
     19        (-[_WKProcessPoolConfiguration setProcessSwapsOnNavigation:]):
     20        (-[_WKProcessPoolConfiguration processSwapsOnNavigation]):
     21
    1222018-02-19  Daniel Bates  <dabates@apple.com>
    223
  • trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h

    r228019 r228723  
    136136    void setPresentingApplicationPID(ProcessID pid) { m_presentingApplicationPID = pid; }
    137137
     138    bool processSwapsOnNavigation() const { return m_processSwapsOnNavigation; }
     139    void setProcessSwapsOnNavigation(bool swaps) { m_processSwapsOnNavigation = swaps; }
     140
    138141private:
    139142    bool m_shouldHaveLegacyDataStore { false };
     
    167170    bool m_shouldCaptureAudioInUIProcess { false };
    168171    ProcessID m_presentingApplicationPID { getCurrentProcessID() };
     172    bool m_processSwapsOnNavigation { false };
     173
    169174#if PLATFORM(IOS)
    170175    WTF::String m_ctDataConnectionServiceType;
  • trunk/Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.cpp

    r228019 r228723  
    158158    toImpl(configuration)->setShouldCaptureAudioInUIProcess(should);
    159159}
     160
     161bool WKContextConfigurationProcessSwapsOnNavigation(WKContextConfigurationRef configuration)
     162{
     163    return toImpl(configuration)->processSwapsOnNavigation();
     164}
     165
     166void WKContextConfigurationSetProcessSwapsOnNavigation(WKContextConfigurationRef configuration, bool swaps)
     167{
     168    toImpl(configuration)->setProcessSwapsOnNavigation(swaps);
     169}
  • trunk/Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.h

    r228019 r228723  
    6969WK_EXPORT void WKContextConfigurationSetShouldCaptureAudioInUIProcess(WKContextConfigurationRef configuration, bool allowed);
    7070
     71WK_EXPORT bool WKContextConfigurationProcessSwapsOnNavigation(WKContextConfigurationRef configuration);
     72WK_EXPORT void WKContextConfigurationSetProcessSwapsOnNavigation(WKContextConfigurationRef configuration, bool swaps);
     73
    7174#ifdef __cplusplus
    7275}
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h

    r223791 r228723  
    5858#endif
    5959@property (nonatomic) pid_t presentingApplicationPID WK_API_AVAILABLE(macosx(10.13), ios(11.0));
     60@property (nonatomic) BOOL processSwapsOnNavigation WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
    6061
    6162@end
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm

    r223791 r228723  
    228228}
    229229
     230- (void)setProcessSwapsOnNavigation:(BOOL)swaps
     231{
     232    _processPoolConfiguration->setProcessSwapsOnNavigation(swaps);
     233}
     234
     235- (BOOL)processSwapsOnNavigation
     236{
     237    return _processPoolConfiguration->processSwapsOnNavigation();
     238}
     239
    230240#if PLATFORM(IOS)
    231241- (NSString *)CTDataConnectionServiceType
Note: See TracChangeset for help on using the changeset viewer.