Changeset 295528 in webkit
- Timestamp:
- Jun 14, 2022 11:02:18 AM (2 years ago)
- Location:
- trunk/Source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/wtf/PlatformHave.h
r295522 r295528 1230 1230 #endif 1231 1231 1232 #if ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 130000) \ 1233 || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 160000)) 1234 #define HAVE_SYSTEM_CONTENT_LS_DATABASE 1 1235 #endif 1236 1232 1237 #if !defined(HAVE_VK_IMAGE_TRANSLATION_SUPPORT) \ 1233 1238 && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 130000) \ -
trunk/Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm
r295445 r295528 37 37 LaunchServicesDatabaseObserver::LaunchServicesDatabaseObserver(NetworkProcess&) 38 38 { 39 #if HAVE(LSDATABASECONTEXT) 39 #if HAVE(LSDATABASECONTEXT) && !HAVE(SYSTEM_CONTENT_LS_DATABASE) 40 40 m_observer = [LSDatabaseContext.sharedDatabaseContext addDatabaseChangeObserver4WebKit:^(xpc_object_t change) { 41 41 auto message = adoptOSObject(xpc_dictionary_create(nullptr, nullptr, 0)); … … 64 64 } 65 65 66 #if HAVE(LSDATABASECONTEXT) 66 #if HAVE(SYSTEM_CONTENT_LS_DATABASE) 67 [LSDatabaseContext.sharedDatabaseContext getSystemContentDatabaseObject4WebKit:makeBlockPtr([connection = connection] (xpc_object_t _Nullable object, NSError * _Nullable error) { 68 if (!object) 69 return; 70 auto message = adoptOSObject(xpc_dictionary_create(nullptr, nullptr, 0)); 71 xpc_dictionary_set_string(message.get(), XPCEndpoint::xpcMessageNameKey, LaunchServicesDatabaseXPCConstants::xpcUpdateLaunchServicesDatabaseMessageName); 72 xpc_dictionary_set_value(message.get(), LaunchServicesDatabaseXPCConstants::xpcLaunchServicesDatabaseKey, object); 73 74 xpc_connection_send_message(connection.get(), message.get()); 75 76 }).get()]; 77 #elif HAVE(LSDATABASECONTEXT) 67 78 RetainPtr<id> observer = [LSDatabaseContext.sharedDatabaseContext addDatabaseChangeObserver4WebKit:^(xpc_object_t change) { 68 79 auto message = adoptOSObject(xpc_dictionary_create(nullptr, nullptr, 0)); … … 83 94 LaunchServicesDatabaseObserver::~LaunchServicesDatabaseObserver() 84 95 { 85 #if HAVE(LSDATABASECONTEXT) 96 #if HAVE(LSDATABASECONTEXT) && !HAVE(SYSTEM_CONTENT_LS_DATABASE) 86 97 [LSDatabaseContext.sharedDatabaseContext removeDatabaseChangeObserver4WebKit:m_observer.get()]; 87 98 #endif
Note: See TracChangeset
for help on using the changeset viewer.