Title: [268675] branches/safari-610.2.11.51-branch/Source/WebKit
- Revision
- 268675
- Author
- alanc...@apple.com
- Date
- 2020-10-19 11:28:56 -0700 (Mon, 19 Oct 2020)
Log Message
Cherry-pick r268570. rdar://problem/70447631
v2: WebKit::XPCServiceEventHandler block should call exit() on the main thread
<https://webkit.org/b/217773>
<rdar://problem/70275659>
Reviewed by Geoff Garen.
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceEventHandler):
- Use NSRunLoop instead of libdispatch to run code on the main
thread since libdispatch can randomly pick a new main thread when
exit() is called on the original main thread.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-610.2.11.51-branch/Source/WebKit/ChangeLog (268674 => 268675)
--- branches/safari-610.2.11.51-branch/Source/WebKit/ChangeLog 2020-10-19 18:17:18 UTC (rev 268674)
+++ branches/safari-610.2.11.51-branch/Source/WebKit/ChangeLog 2020-10-19 18:28:56 UTC (rev 268675)
@@ -1,3 +1,35 @@
+2020-10-19 Kocsen Chung <kocsen_ch...@apple.com>
+
+ Cherry-pick r268570. rdar://problem/70447631
+
+ v2: WebKit::XPCServiceEventHandler block should call exit() on the main thread
+ <https://webkit.org/b/217773>
+ <rdar://problem/70275659>
+
+ Reviewed by Geoff Garen.
+
+ * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
+ (WebKit::XPCServiceEventHandler):
+ - Use NSRunLoop instead of libdispatch to run code on the main
+ thread since libdispatch can randomly pick a new main thread when
+ exit() is called on the original main thread.
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-10-15 David Kilzer <ddkil...@apple.com>
+
+ v2: WebKit::XPCServiceEventHandler block should call exit() on the main thread
+ <https://webkit.org/b/217773>
+ <rdar://problem/70275659>
+
+ Reviewed by Geoff Garen.
+
+ * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
+ (WebKit::XPCServiceEventHandler):
+ - Use NSRunLoop instead of libdispatch to run code on the main
+ thread since libdispatch can randomly pick a new main thread when
+ exit() is called on the original main thread.
+
2020-10-14 Alan Coon <alanc...@apple.com>
Cherry-pick r268376. rdar://problem/70312257
Modified: branches/safari-610.2.11.51-branch/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm (268674 => 268675)
--- branches/safari-610.2.11.51-branch/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm 2020-10-19 18:17:18 UTC (rev 268674)
+++ branches/safari-610.2.11.51-branch/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm 2020-10-19 18:28:56 UTC (rev 268675)
@@ -48,7 +48,9 @@
if (type == XPC_TYPE_ERROR) {
if (event == XPC_ERROR_CONNECTION_INVALID || event == XPC_ERROR_TERMINATION_IMMINENT) {
// FIXME: Handle this case more gracefully.
- exit(EXIT_FAILURE);
+ [[NSRunLoop mainRunLoop] performBlock:^{
+ exit(EXIT_FAILURE);
+ }];
}
} else {
assert(type == XPC_TYPE_DICTIONARY);
@@ -73,7 +75,9 @@
InitializerFunction initializerFunctionPtr = reinterpret_cast<InitializerFunction>(CFBundleGetFunctionPointerForName(webKitBundle, entryPointFunctionName));
if (!initializerFunctionPtr) {
NSLog(@"Unable to find entry point in WebKit.framework with name: %@", (__bridge NSString *)entryPointFunctionName);
- exit(EXIT_FAILURE);
+ [[NSRunLoop mainRunLoop] performBlock:^{
+ exit(EXIT_FAILURE);
+ }];
}
auto reply = adoptOSObject(xpc_dictionary_create_reply(event));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes