Changeset 273787 in webkit
- Timestamp:
- Mar 2, 2021, 7:08:22 PM (6 years ago)
- Location:
- branches/safari-612.1.5-branch/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
-
branches/safari-612.1.5-branch/Source/WebCore/PAL/ChangeLog
r273214 r273787 1 2021-03-02 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r273270. rdar://problem/74953268 4 5 [macOS] Disabling relaunch on login for the WebContent process is racy 6 https://bugs.webkit.org/show_bug.cgi?id=222074 7 <rdar://problem/74230216> 8 9 Reviewed by Geoffrey Garen. 10 11 Source/WebCore/PAL: 12 13 Declare Launch Services key to disable relaunch on login. 14 15 * pal/spi/cocoa/LaunchServicesSPI.h: 16 17 Source/WebKit: 18 19 When NSApplication is being intialized, the method -[NSApplication disableRelaunchOnLogin] is dispatched on a non-main thread, which is in a race 20 with the revocation of the Launch Services sandbox extension. This patch addresses this by setting this information synchronously with Launch 21 Services while the sandbox extension is being held. Additionally, accessibility related code under WebPage::platformInitialize may reach out to 22 the Launch Services daemon once during the lifetime of the WebContent process. Make sure that call succeeds by making a synchronous call while 23 a sandbox extension to the Launch Services daemon is being held. 24 25 * WebProcess/cocoa/WebProcessCocoa.mm: 26 (WebKit::WebProcess::platformInitializeWebProcess): 27 28 29 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273270 268f45cc-cd09-0410-ab3c-d52691b4dbfc 30 31 2021-02-22 Per Arne <pvollan@apple.com> 32 33 [macOS] Disabling relaunch on login for the WebContent process is racy 34 https://bugs.webkit.org/show_bug.cgi?id=222074 35 <rdar://problem/74230216> 36 37 Reviewed by Geoffrey Garen. 38 39 Declare Launch Services key to disable relaunch on login. 40 41 * pal/spi/cocoa/LaunchServicesSPI.h: 42 1 43 2021-02-20 Chris Fleizach <cfleizach@apple.com> 2 44 -
branches/safari-612.1.5-branch/Source/WebCore/PAL/pal/spi/cocoa/LaunchServicesSPI.h
r270284 r273787 111 111 112 112 extern const CFStringRef _kLSDisplayNameKey; 113 extern const CFStringRef _kLSPersistenceSuppressRelaunchAtLoginKey; 113 114 114 115 LSASNRef _LSGetCurrentApplicationASN(); -
branches/safari-612.1.5-branch/Source/WebKit/ChangeLog
r273786 r273787 1 2021-03-02 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r273270. rdar://problem/74953268 4 5 [macOS] Disabling relaunch on login for the WebContent process is racy 6 https://bugs.webkit.org/show_bug.cgi?id=222074 7 <rdar://problem/74230216> 8 9 Reviewed by Geoffrey Garen. 10 11 Source/WebCore/PAL: 12 13 Declare Launch Services key to disable relaunch on login. 14 15 * pal/spi/cocoa/LaunchServicesSPI.h: 16 17 Source/WebKit: 18 19 When NSApplication is being intialized, the method -[NSApplication disableRelaunchOnLogin] is dispatched on a non-main thread, which is in a race 20 with the revocation of the Launch Services sandbox extension. This patch addresses this by setting this information synchronously with Launch 21 Services while the sandbox extension is being held. Additionally, accessibility related code under WebPage::platformInitialize may reach out to 22 the Launch Services daemon once during the lifetime of the WebContent process. Make sure that call succeeds by making a synchronous call while 23 a sandbox extension to the Launch Services daemon is being held. 24 25 * WebProcess/cocoa/WebProcessCocoa.mm: 26 (WebKit::WebProcess::platformInitializeWebProcess): 27 28 29 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273270 268f45cc-cd09-0410-ab3c-d52691b4dbfc 30 31 2021-02-22 Per Arne <pvollan@apple.com> 32 33 [macOS] Disabling relaunch on login for the WebContent process is racy 34 https://bugs.webkit.org/show_bug.cgi?id=222074 35 <rdar://problem/74230216> 36 37 Reviewed by Geoffrey Garen. 38 39 When NSApplication is being intialized, the method -[NSApplication disableRelaunchOnLogin] is dispatched on a non-main thread, which is in a race 40 with the revocation of the Launch Services sandbox extension. This patch addresses this by setting this information synchronously with Launch 41 Services while the sandbox extension is being held. Additionally, accessibility related code under WebPage::platformInitialize may reach out to 42 the Launch Services daemon once during the lifetime of the WebContent process. Make sure that call succeeds by making a synchronous call while 43 a sandbox extension to the Launch Services daemon is being held. 44 45 * WebProcess/cocoa/WebProcessCocoa.mm: 46 (WebKit::WebProcess::platformInitializeWebProcess): 47 1 48 2021-03-02 Alan Coon <alancoon@apple.com> 2 49 -
branches/safari-612.1.5-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r273183 r273787 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.