- Revision
- 270969
- Author
- [email protected]
- Date
- 2020-12-18 09:23:52 -0800 (Fri, 18 Dec 2020)
Log Message
[iOS] Stop leaking an XPC boost message to XPC services
https://bugs.webkit.org/show_bug.cgi?id=219453
Reviewed by Geoff Garen.
Source/WebKit:
Stop leaking an XPC boost message to XPC services on builds where RunningBoard is able to give the right
priorities to our XPC services based on the type of RunningBoard assertion is being held. There is no
behavior change for the Network/WebContent processes since those were blocklisted in RunningBoard (Turning
on the RB_full_manage_WK_jetsam feature flag gives us the default RunningBoard behavior without
blocklisting). However, this allows the new GPUProcess to move to IDLE jetsam band when homing out of
MobileSafari, which makes the GPUProcess eligible for the freezer. Previously, the leaked boost message
would keep the GPUProcess in a higher jetsam band.
* FeatureFlags/WebKit.plist:
Add RB_full_manage_WK_jetsam feature flag and turn it on. On recent enough builds of RunningBoard, this
disables the blocklisting of the WebContent/Network processes in RunningBoard so that RunningBoard can now
set the priority of those processes (instead of us boosting our priority via boost messages).
* GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-iOS.plist:
* NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-iOS.plist:
* WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-iOS.plist:
* WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist:
Set _ProcessType=App so that RunningBoard is able to set the priority of our XPC services on iOS. Without
this change, we get a permission denied when RunningBoard attempts to set the priority of our XPC services.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::shouldLeakBoost):
Stop leaking a boost message on iOS when RUNNINGBOARD_WEBKIT_PRIORITY_SUPPORT compile-time flag is enabled
and when the RB_full_manage_WK_jetsam feature flag is enabled.
Source/WTF:
Add new RUNNINGBOARD_WEBKIT_PRIORITY_SUPPORT build time flag since we need a recent
enough build of RunningBoard to do this.
* wtf/PlatformHave.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (270968 => 270969)
--- trunk/Source/WTF/ChangeLog 2020-12-18 13:29:57 UTC (rev 270968)
+++ trunk/Source/WTF/ChangeLog 2020-12-18 17:23:52 UTC (rev 270969)
@@ -1,3 +1,15 @@
+2020-12-18 Chris Dumez <[email protected]>
+
+ [iOS] Stop leaking an XPC boost message to XPC services
+ https://bugs.webkit.org/show_bug.cgi?id=219453
+
+ Reviewed by Geoff Garen.
+
+ Add new RUNNINGBOARD_WEBKIT_PRIORITY_SUPPORT build time flag since we need a recent
+ enough build of RunningBoard to do this.
+
+ * wtf/PlatformHave.h:
+
2020-12-17 Chris Dumez <[email protected]>
Unreviewed, drop unnecessary forward declaration added in r270938.
Modified: trunk/Source/WTF/wtf/PlatformHave.h (270968 => 270969)
--- trunk/Source/WTF/wtf/PlatformHave.h 2020-12-18 13:29:57 UTC (rev 270968)
+++ trunk/Source/WTF/wtf/PlatformHave.h 2020-12-18 17:23:52 UTC (rev 270969)
@@ -725,6 +725,12 @@
#define HAVE_CTFONTDESCRIPTOR_CREATE_WITH_TEXT_STYLE_AND_ATTRIBUTES 1
#endif
+#if ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000) \
+ || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 80000) \
+ || (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 150000)
+#define HAVE_RUNNINGBOARD_WEBKIT_PRIORITY_SUPPORT 1
+#endif
+
#if PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000
#define HAVE_CATALYST_USER_INTERFACE_IDIOM_AND_SCALE_FACTOR 1
#endif
Modified: trunk/Source/WebKit/ChangeLog (270968 => 270969)
--- trunk/Source/WebKit/ChangeLog 2020-12-18 13:29:57 UTC (rev 270968)
+++ trunk/Source/WebKit/ChangeLog 2020-12-18 17:23:52 UTC (rev 270969)
@@ -1,3 +1,35 @@
+2020-12-18 Chris Dumez <[email protected]>
+
+ [iOS] Stop leaking an XPC boost message to XPC services
+ https://bugs.webkit.org/show_bug.cgi?id=219453
+
+ Reviewed by Geoff Garen.
+
+ Stop leaking an XPC boost message to XPC services on builds where RunningBoard is able to give the right
+ priorities to our XPC services based on the type of RunningBoard assertion is being held. There is no
+ behavior change for the Network/WebContent processes since those were blocklisted in RunningBoard (Turning
+ on the RB_full_manage_WK_jetsam feature flag gives us the default RunningBoard behavior without
+ blocklisting). However, this allows the new GPUProcess to move to IDLE jetsam band when homing out of
+ MobileSafari, which makes the GPUProcess eligible for the freezer. Previously, the leaked boost message
+ would keep the GPUProcess in a higher jetsam band.
+
+ * FeatureFlags/WebKit.plist:
+ Add RB_full_manage_WK_jetsam feature flag and turn it on. On recent enough builds of RunningBoard, this
+ disables the blocklisting of the WebContent/Network processes in RunningBoard so that RunningBoard can now
+ set the priority of those processes (instead of us boosting our priority via boost messages).
+
+ * GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-iOS.plist:
+ * NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-iOS.plist:
+ * WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-iOS.plist:
+ * WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist:
+ Set _ProcessType=App so that RunningBoard is able to set the priority of our XPC services on iOS. Without
+ this change, we get a permission denied when RunningBoard attempts to set the priority of our XPC services.
+
+ * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+ (WebKit::shouldLeakBoost):
+ Stop leaking a boost message on iOS when RUNNINGBOARD_WEBKIT_PRIORITY_SUPPORT compile-time flag is enabled
+ and when the RB_full_manage_WK_jetsam feature flag is enabled.
+
2020-12-17 Kimmo Kinnunen <[email protected]>
REGRESSION (r268386): Snapshots of WebGL content in the tab picker don't work (black map on Google Maps)
Modified: trunk/Source/WebKit/FeatureFlags/WebKit.plist (270968 => 270969)
--- trunk/Source/WebKit/FeatureFlags/WebKit.plist 2020-12-18 13:29:57 UTC (rev 270968)
+++ trunk/Source/WebKit/FeatureFlags/WebKit.plist 2020-12-18 17:23:52 UTC (rev 270969)
@@ -87,5 +87,10 @@
<key>Enabled</key>
<true/>
</dict>
+ <key>RB_full_manage_WK_jetsam</key>
+ <dict>
+ <key>Enabled</key>
+ <true/>
+ </dict>
</dict>
</plist>
Modified: trunk/Source/WebKit/GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-iOS.plist (270968 => 270969)
--- trunk/Source/WebKit/GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-iOS.plist 2020-12-18 13:29:57 UTC (rev 270968)
+++ trunk/Source/WebKit/GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-iOS.plist 2020-12-18 17:23:52 UTC (rev 270969)
@@ -34,6 +34,8 @@
<string>Application</string>
<key>RunLoopType</key>
<string>NSRunLoop</string>
+ <key>_ProcessType</key>
+ <string>App</string>
<key>_MultipleInstances</key>
<true/>
</dict>
Modified: trunk/Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-iOS.plist (270968 => 270969)
--- trunk/Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-iOS.plist 2020-12-18 13:29:57 UTC (rev 270968)
+++ trunk/Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-iOS.plist 2020-12-18 17:23:52 UTC (rev 270969)
@@ -34,6 +34,8 @@
<string>Application</string>
<key>RunLoopType</key>
<string>NSRunLoop</string>
+ <key>_ProcessType</key>
+ <string>App</string>
<key>_MultipleInstances</key>
<true/>
</dict>
Modified: trunk/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm (270968 => 270969)
--- trunk/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm 2020-12-18 13:29:57 UTC (rev 270968)
+++ trunk/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm 2020-12-18 17:23:52 UTC (rev 270969)
@@ -26,6 +26,7 @@
#import "config.h"
#import "ProcessLauncher.h"
+#import "WebPreferencesDefaultValues.h"
#import <crt_externs.h>
#import <mach-o/dyld.h>
#import <mach/mach_error.h>
@@ -74,9 +75,15 @@
static bool shouldLeakBoost(const ProcessLauncher::LaunchOptions& launchOptions)
{
#if PLATFORM(IOS_FAMILY)
- // On iOS, leak a boost onto all child processes
UNUSED_PARAM(launchOptions);
+#if HAVE(RUNNINGBOARD_WEBKIT_PRIORITY_SUPPORT)
+ // On iOS, we don't need to leak a boost message when RunningBoard process assertions give us the
+ // right priorities.
+ static const bool runningBoardHandlesPriorities = isFeatureFlagEnabled("RB_full_manage_WK_jetsam"_s);
+ return !runningBoardHandlesPriorities;
+#else
return true;
+#endif // HAVE(RUNNINGBOARD_WEBKIT_PRIORITY_SUPPORT)
#else
// On Mac, leak a boost onto the NetworkProcess, GPUProcess, and WebAuthnProcess.
#if ENABLE(GPU_PROCESS)
Modified: trunk/Source/WebKit/WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-iOS.plist (270968 => 270969)
--- trunk/Source/WebKit/WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-iOS.plist 2020-12-18 13:29:57 UTC (rev 270968)
+++ trunk/Source/WebKit/WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-iOS.plist 2020-12-18 17:23:52 UTC (rev 270969)
@@ -34,6 +34,8 @@
<string>Application</string>
<key>RunLoopType</key>
<string>NSRunLoop</string>
+ <key>_ProcessType</key>
+ <string>App</string>
<key>_MultipleInstances</key>
<true/>
</dict>
Modified: trunk/Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist (270968 => 270969)
--- trunk/Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist 2020-12-18 13:29:57 UTC (rev 270968)
+++ trunk/Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist 2020-12-18 17:23:52 UTC (rev 270969)
@@ -34,6 +34,8 @@
<string>Application</string>
<key>RunLoopType</key>
<string>NSRunLoop</string>
+ <key>_ProcessType</key>
+ <string>App</string>
<key>_MultipleInstances</key>
<true/>
<key>_HighBitsASLR</key>