Changeset 253127 in webkit
- Timestamp:
- Dec 4, 2019 4:07:39 PM (4 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r253118 r253127 1 2019-12-04 Per Arne Vollan <pvollan@apple.com> 2 3 [iOS] The UI process should issue mach sandbox extension to "com.apple.AGXCompilerService" 4 https://bugs.webkit.org/show_bug.cgi?id=203915 5 6 Reviewed by Brent Fulgham. 7 8 Only a few iPad models need access to "com.apple.AGXCompilerService” in the WebContent process. 9 The UI process should issue this mach extension for these iPad models. 10 11 * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: 12 * Shared/WebProcessCreationParameters.cpp: 13 (WebKit::WebProcessCreationParameters::encode const): 14 (WebKit::WebProcessCreationParameters::decode): 15 * Shared/WebProcessCreationParameters.h: 16 * UIProcess/Cocoa/WebProcessPoolCocoa.mm: 17 (WebKit::deviceHasAGXCompilerService): 18 (WebKit::WebProcessPool::platformInitializeWebProcess): 19 * WebProcess/cocoa/WebProcessCocoa.mm: 20 (WebKit::WebProcess::platformInitializeWebProcess): 21 1 22 2019-12-04 Kate Cheney <katherine_cheney@apple.com> 2 23 -
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
r253011 r253127 286 286 (sysctl-name #"kern.bootsessionuuid")) 287 287 288 (allow mach-lookup (with report) (with telemetry) 289 (xpc-service-name-prefix "com.apple.AGXCompilerService")) 290 288 291 (allow mach-lookup 289 (xpc-service-name-prefix "com.apple.AGXCompilerService")290 292 ;; <rdar://problem/47268166> 291 293 (xpc-service-name "com.apple.MTLCompilerService")) … … 965 967 (require-all 966 968 (extension "com.apple.webkit.extension.mach") 967 (global-name "com.apple.iphone.axserver-systemwide" "com.apple.tccd" )))969 (global-name "com.apple.iphone.axserver-systemwide" "com.apple.tccd" "com.apple.AGXCompilerService"))) 968 970 969 971 (media-capture-support) -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
r251121 r253127 159 159 160 160 encoder << websiteDataStoreParameters; 161 162 #if PLATFORM(IOS) 163 encoder << compilerServiceExtensionHandle; 164 #endif 161 165 } 162 166 … … 389 393 parameters.websiteDataStoreParameters = WTFMove(*websiteDataStoreParameters); 390 394 395 #if PLATFORM(IOS) 396 Optional<Optional<SandboxExtension::Handle>> compilerServiceExtensionHandle; 397 decoder >> compilerServiceExtensionHandle; 398 if (!compilerServiceExtensionHandle) 399 return false; 400 parameters.compilerServiceExtensionHandle = WTFMove(*compilerServiceExtensionHandle); 401 #endif 402 391 403 return true; 392 404 } -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
r251121 r253127 197 197 198 198 Optional<WebProcessDataStoreParameters> websiteDataStoreParameters; 199 200 #if PLATFORM(IOS) 201 Optional<SandboxExtension::Handle> compilerServiceExtensionHandle; 202 #endif 199 203 }; 200 204 -
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
r252368 r253127 69 69 #endif 70 70 71 #if PLATFORM(IOS) 72 #import <sys/utsname.h> 73 #endif 74 71 75 NSString *WebServiceWorkerRegistrationDirectoryDefaultsKey = @"WebServiceWorkerRegistrationDirectory"; 72 76 NSString *WebKitLocalCacheDefaultsKey = @"WebKitLocalCache"; … … 167 171 #endif 168 172 } 173 174 #if PLATFORM(IOS) 175 static bool deviceHasAGXCompilerService() 176 { 177 static bool deviceHasAGXCompilerService = false; 178 static std::once_flag flag; 179 std::call_once( 180 flag, 181 [] () { 182 struct utsname systemInfo; 183 if (uname(&systemInfo)) 184 return; 185 const char* machine = systemInfo.machine; 186 if (!strcmp(machine, "iPad5,1") || !strcmp(machine, "iPad5,2") || !strcmp(machine, "iPad5,3") || !strcmp(machine, "iPad5,4")) 187 deviceHasAGXCompilerService = true; 188 }); 189 return deviceHasAGXCompilerService; 190 } 191 #endif 169 192 170 193 void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process, WebProcessCreationParameters& parameters) … … 264 287 parameters.screenProperties = WTFMove(screenProperties); 265 288 parameters.useOverlayScrollbars = ([NSScroller preferredScrollerStyle] == NSScrollerStyleOverlay); 289 #endif 290 291 #if PLATFORM(IOS) 292 if (deviceHasAGXCompilerService()) { 293 SandboxExtension::Handle compilerServiceExtensionHandle; 294 SandboxExtension::createHandleForMachLookup("com.apple.AGXCompilerService", WTF::nullopt, compilerServiceExtensionHandle); 295 parameters.compilerServiceExtensionHandle = WTFMove(compilerServiceExtensionHandle); 296 } 266 297 #endif 267 298 } -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r252712 r253127 222 222 #endif 223 223 #endif 224 225 #if PLATFORM(IOS) 226 if (parameters.compilerServiceExtensionHandle) 227 SandboxExtension::consumePermanently(*parameters.compilerServiceExtensionHandle); 228 #endif 224 229 } 225 230
Note: See TracChangeset
for help on using the changeset viewer.