Changeset 261387 in webkit
- Timestamp:
- May 8, 2020 9:33:21 AM (4 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/PAL/ChangeLog
r261320 r261387 1 2020-05-08 Per Arne Vollan <pvollan@apple.com> 2 3 [Cocoa] Close connections to Launch Services after revoking extension 4 https://bugs.webkit.org/show_bug.cgi?id=211594 5 6 Reviewed by Brent Fulgham. 7 8 Declare _LSDService class. 9 10 * pal/spi/cocoa/LaunchServicesSPI.h: 11 1 12 2020-05-07 Darin Adler <darin@apple.com> 2 13 -
trunk/Source/WebCore/PAL/pal/spi/cocoa/LaunchServicesSPI.h
r260366 r261387 86 86 #endif // !USE(APPLE_INTERNAL_SDK) 87 87 88 @interface _LSDService : NSObject <NSXPCListenerDelegate> 89 + (NSArray<Class> *)allServiceClasses; 90 + (NSXPCConnection *)XPCConnectionToService; 91 @end 92 88 93 #if PLATFORM(MAC) 89 94 -
trunk/Source/WebKit/ChangeLog
r261375 r261387 1 2020-05-08 Per Arne Vollan <pvollan@apple.com> 2 3 [Cocoa] Close connections to Launch Services after revoking extension 4 https://bugs.webkit.org/show_bug.cgi?id=211594 5 6 Reviewed by Brent Fulgham. 7 8 In <https://trac.webkit.org/changeset/258915/webkit>, connections to the Launch Services database mapping 9 services were denied, by creating a temporary extension. After revoking this extension in the WebContent 10 process, it is important to close any open connections to Launch Services initiated by the mapping. 11 12 No new tests, covered by existing UTI/MIME type tests. 13 14 * WebProcess/cocoa/WebProcessCocoa.mm: 15 (WebKit::WebProcess::platformInitializeWebProcess): 16 1 17 2020-05-08 Youenn Fablet <youenn@apple.com> 2 18 -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r261296 r261387 87 87 #import <wtf/FileSystem.h> 88 88 #import <wtf/ProcessPrivilege.h> 89 #import <wtf/SoftLinking.h> 89 90 #import <wtf/cocoa/NSURLExtras.h> 90 91 #import <wtf/cocoa/RuntimeApplicationChecksCocoa.h> … … 135 136 #import <os/state_private.h> 136 137 #endif 138 139 SOFT_LINK_FRAMEWORK(CoreServices) 140 SOFT_LINK_CLASS(CoreServices, _LSDService) 141 SOFT_LINK_CLASS(CoreServices, _LSDOpenService) 137 142 138 143 #define RELEASE_LOG_SESSION_ID (m_sessionID ? m_sessionID->toUInt64() : 0) … … 204 209 ok = extension->revoke(); 205 210 ASSERT_UNUSED(ok, ok); 211 212 auto services = [get_LSDServiceClass() allServiceClasses]; 213 for (Class cls in services) { 214 auto connection = [cls XPCConnectionToService]; 215 [connection invalidate]; 216 } 217 218 ASSERT(String(uti.get()) = String(adoptCF(UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, CFSTR("text/html"), 0)).get())); 206 219 } 207 220
Note: See TracChangeset
for help on using the changeset viewer.