⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 268838 in webkit


Ignore:
Timestamp:
Oct 21, 2020, 3:16:08 PM (6 years ago)
Author:
Alan Coon
Message:

Cherry-pick r268570. rdar://problem/70541887

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

Location:
branches/safari-610-branch/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-610-branch/Source/WebKit/ChangeLog

    r268834 r268838  
     12020-10-21  Russell Epstein  <repstein@apple.com>
     2
     3        Cherry-pick r268570. rdar://problem/70541887
     4
     5    v2: WebKit::XPCServiceEventHandler block should call exit() on the main thread
     6    <https://webkit.org/b/217773>
     7    <rdar://problem/70275659>
     8   
     9    Reviewed by Geoff Garen.
     10   
     11    * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
     12    (WebKit::XPCServiceEventHandler):
     13    - Use NSRunLoop instead of libdispatch to run code on the main
     14      thread since libdispatch can randomly pick a new main thread when
     15      exit() is called on the original main thread.
     16   
     17    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     18
     19    2020-10-15  David Kilzer  <ddkilzer@apple.com>
     20
     21            v2: WebKit::XPCServiceEventHandler block should call exit() on the main thread
     22            <https://webkit.org/b/217773>
     23            <rdar://problem/70275659>
     24
     25            Reviewed by Geoff Garen.
     26
     27            * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
     28            (WebKit::XPCServiceEventHandler):
     29            - Use NSRunLoop instead of libdispatch to run code on the main
     30              thread since libdispatch can randomly pick a new main thread when
     31              exit() is called on the original main thread.
     32
    1332020-10-21  Russell Epstein  <repstein@apple.com>
    234
  • branches/safari-610-branch/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm

    r265715 r268838  
    4949            if (event == XPC_ERROR_CONNECTION_INVALID || event == XPC_ERROR_TERMINATION_IMMINENT) {
    5050                // FIXME: Handle this case more gracefully.
    51                 exit(EXIT_FAILURE);
     51                [[NSRunLoop mainRunLoop] performBlock:^{
     52                    exit(EXIT_FAILURE);
     53                }];
    5254            }
    5355        } else {
     
    7476                if (!initializerFunctionPtr) {
    7577                    NSLog(@"Unable to find entry point in WebKit.framework with name: %@", (__bridge NSString *)entryPointFunctionName);
    76                     exit(EXIT_FAILURE);
     78                    [[NSRunLoop mainRunLoop] performBlock:^{
     79                        exit(EXIT_FAILURE);
     80                    }];
    7781                }
    7882
Note: See TracChangeset for help on using the changeset viewer.