Changeset 273270 in webkit
- Timestamp:
- Feb 22, 2021, 12:58:56 PM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
-
WebCore/PAL/ChangeLog (modified) (1 diff)
-
WebCore/PAL/pal/spi/cocoa/LaunchServicesSPI.h (modified) (1 diff)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/WebProcess/cocoa/WebProcessCocoa.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/PAL/ChangeLog
r273214 r273270 1 2021-02-22 Per Arne <pvollan@apple.com> 2 3 [macOS] Disabling relaunch on login for the WebContent process is racy 4 https://bugs.webkit.org/show_bug.cgi?id=222074 5 <rdar://problem/74230216> 6 7 Reviewed by Geoffrey Garen. 8 9 Declare Launch Services key to disable relaunch on login. 10 11 * pal/spi/cocoa/LaunchServicesSPI.h: 12 1 13 2021-02-20 Chris Fleizach <cfleizach@apple.com> 2 14 -
trunk/Source/WebCore/PAL/pal/spi/cocoa/LaunchServicesSPI.h
r270284 r273270 111 111 112 112 extern const CFStringRef _kLSDisplayNameKey; 113 extern const CFStringRef _kLSPersistenceSuppressRelaunchAtLoginKey; 113 114 114 115 LSASNRef _LSGetCurrentApplicationASN(); -
trunk/Source/WebKit/ChangeLog
r273266 r273270 1 2021-02-22 Per Arne <pvollan@apple.com> 2 3 [macOS] Disabling relaunch on login for the WebContent process is racy 4 https://bugs.webkit.org/show_bug.cgi?id=222074 5 <rdar://problem/74230216> 6 7 Reviewed by Geoffrey Garen. 8 9 When NSApplication is being intialized, the method -[NSApplication disableRelaunchOnLogin] is dispatched on a non-main thread, which is in a race 10 with the revocation of the Launch Services sandbox extension. This patch addresses this by setting this information synchronously with Launch 11 Services while the sandbox extension is being held. Additionally, accessibility related code under WebPage::platformInitialize may reach out to 12 the Launch Services daemon once during the lifetime of the WebContent process. Make sure that call succeeds by making a synchronous call while 13 a sandbox extension to the Launch Services daemon is being held. 14 15 * WebProcess/cocoa/WebProcessCocoa.mm: 16 (WebKit::WebProcess::platformInitializeWebProcess): 17 1 18 2021-02-22 Sam Sneddon <gsnedders@apple.com> 2 19 -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r273183 r273270 330 330 331 331 #if ENABLE(SET_WEBCONTENT_PROCESS_INFORMATION_IN_NETWORK_PROCESS) 332 // Disable relaunch on login. This is also done from -[NSApplication init] by dispatching -[NSApplication disableRelaunchOnLogin] on a non-main thread. 333 // This will be in a race with the closing of the Launch Services connection, so call it synchronously here. 334 // The cost of calling this should be small, and it is not expected to have any impact on performance. 335 _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), _kLSPersistenceSuppressRelaunchAtLoginKey, kCFBooleanTrue, nullptr); 336 337 // This is being called under WebPage::platformInitialize(), and may reach out to the Launch Services daemon once in the lifetime of the process. 338 // Call this synchronously here while a sandbox extension to Launch Services is being held. 339 [NSAccessibilityRemoteUIElement remoteTokenForLocalUIElement:adoptNS([[WKAccessibilityWebPageObject alloc] init]).get()]; 340 332 341 auto method = class_getInstanceMethod([NSApplication class], @selector(_updateCanQuitQuietlyAndSafely)); 333 342 method_setImplementation(method, (IMP)preventAppKitFromContactingLaunchServices);
Note:
See TracChangeset
for help on using the changeset viewer.