Changeset 275619 in webkit
- Timestamp:
- Apr 7, 2021 12:16:47 PM (3 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r275597 r275619 1 2021-04-07 Alex Christensen <achristensen@webkit.org> 2 3 Use os_transaction_create instead of deprecated xpc_transaction_begin/end 4 https://bugs.webkit.org/show_bug.cgi?id=224288 5 6 Reviewed by Tim Horton. 7 8 * wtf/spi/darwin/XPCSPI.h: 9 1 10 2021-04-06 Yusuke Suzuki <ysuzuki@apple.com> 2 11 -
trunk/Source/WTF/wtf/spi/darwin/XPCSPI.h
r275172 r275619 88 88 89 89 #if USE(APPLE_INTERNAL_SDK) 90 #include <os/transaction_private.h> 90 91 #include <xpc/private.h> 91 92 #else 93 94 #if OS_OBJECT_USE_OBJC 95 OS_OBJECT_DECL(os_transaction); 96 #else 97 typedef struct os_transaction_s *os_transaction_t; 98 #endif 99 92 100 enum { 93 101 DISPATCH_MACH_SEND_POSSIBLE = 0x8, 94 102 }; 95 #endif 103 #endif // USE(APPLE_INTERNAL_SDK) 96 104 97 105 #if !defined(XPC_NOESCAPE) … … 149 157 void xpc_main(xpc_connection_handler_t); 150 158 const char* xpc_string_get_string_ptr(xpc_object_t); 151 void xpc_transaction_begin(void); 152 void xpc_transaction_end(void); 159 os_transaction_t os_transaction_create(const char *description); 153 160 void xpc_transaction_exit_clean(void); 154 161 void xpc_track_activity(void); -
trunk/Source/WebKit/ChangeLog
r275614 r275619 1 2021-04-07 Alex Christensen <achristensen@webkit.org> 2 3 Use os_transaction_create instead of deprecated xpc_transaction_begin/end 4 https://bugs.webkit.org/show_bug.cgi?id=224288 5 6 Reviewed by Tim Horton. 7 8 xpc_transaction_begin/end are deprecated with os_transaction_t being the replacement. 9 The transaction object makes it easier to associate a transaction's begin and end with each other, 10 and it adds a name, which makes system level debugging of what transactions are happening in which 11 processes much nicer. 12 13 * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h: 14 (WebKit::XPCServiceInitializer): 15 * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm: 16 (WebKit::osTransaction): 17 (WebKit::XPCServiceExit): 18 1 19 2021-04-07 Jer Noble <jer.noble@apple.com> 2 20 -
trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h
r275013 r275619 81 81 } 82 82 83 #if PLATFORM(MAC) 84 OSObjectPtr<os_transaction_t>& osTransaction(); 85 #endif 86 83 87 template<typename XPCServiceType, typename XPCServiceInitializerDelegateType> 84 88 void XPCServiceInitializer(OSObjectPtr<xpc_connection_t> connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage) … … 97 101 // the UIProcess takes process assertions on behalf of its child processes. 98 102 #if PLATFORM(MAC) 99 ALLOW_DEPRECATED_DECLARATIONS_BEGIN 100 xpc_transaction_begin(); 101 ALLOW_DEPRECATED_DECLARATIONS_END 103 osTransaction() = adoptOSObject(os_transaction_create("WebKit XPC Service")); 102 104 #endif 103 105 -
trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm
r275268 r275619 157 157 } 158 158 159 #if PLATFORM(MAC) 160 OSObjectPtr<os_transaction_t>& osTransaction() 161 { 162 static NeverDestroyed<OSObjectPtr<os_transaction_t>> transaction; 163 return transaction.get(); 164 } 165 #endif 166 159 167 void XPCServiceExit(OSObjectPtr<xpc_object_t>&& priorityBoostMessage) 160 168 { … … 162 170 priorityBoostMessage = nullptr; 163 171 164 // Balances the xpc_transaction_begin() in XPCServiceInitializer.165 172 #if PLATFORM(MAC) 166 ALLOW_DEPRECATED_DECLARATIONS_BEGIN 167 xpc_transaction_end(); 168 ALLOW_DEPRECATED_DECLARATIONS_END 173 osTransaction() = nullptr; 169 174 #endif 170 175
Note: See TracChangeset
for help on using the changeset viewer.