Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 5426d222c452763023a5543d95a8a79e537c1872 https://github.com/WebKit/WebKit/commit/5426d222c452763023a5543d95a8a79e537c1872 Author: Rose <gfunni...@gmail.com> Date: 2024-08-26 (Mon, 26 Aug 2024)
Changed paths: M Source/WTF/wtf/Assertions.cpp M Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm M Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h M Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm M Source/WebKit/UIProcess/API/Cocoa/_WKSystemPreferences.mm M Source/WebKit/UIProcess/API/Cocoa/_WKSystemPreferencesInternal.h M Source/WebKit/UIProcess/WebAuthentication/Mock/MockNfcService.mm M Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm M Tools/TestWebKitAPI/Tests/WebKitCocoa/TextWidth.mm Log Message: ----------- Prevent copying data where possible. https://bugs.webkit.org/show_bug.cgi?id=255164 Reviewed by Darin Adler and Alex Christensen. There is no reason to manually cast to CFStringRef or create it from a string literal if there is a macro that can do this for us. Additionally, we can use CreateWithBytesNoCopy and other similar functions when we know for the entire lifetime of the object, the backing store is valid. * Source/WTF/wtf/Assertions.cpp: (WTF::createWithFormatAndArguments): Switch to CFStringCreateWithCStringNoCopy. * Source/WebCore/editing/cocoa/HTMLConverter.mm: (HTMLConverter::_newLineForElement): Switch to initWithCharactersNoCopy (HTMLConverter::_addQuoteForElement): Ditto. * Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h: Deleted WebKit2HTTPProxyDefaultsKey and WebKit2HTTPSProxyDefaultsKey refs. * Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm: Ditto. * Source/WebKit/UIProcess/API/Cocoa/_WKSystemPreferences.mm: (+[_WKSystemPreferences isCaptivePortalModeEnabled]): Switch to CFStringCreateWithCStringNoCopy. (+[_WKSystemPreferences setCaptivePortalModeEnabled:]): Ditto. (+[_WKSystemPreferences setCaptivePortalModeIgnored:ignore:]): Ditto. * Source/WebKit/UIProcess/API/Cocoa/_WKSystemPreferencesInternal.h: Make LDMEnabledKey and WKLockdownModeContainerConfigurationChangedNotification CFStrings. * Source/WebKit/UIProcess/WebAuthentication/Mock/MockNfcService.mm: (-[WKMockNFTag initWithType:]): Switch to initWithBytesNoCopy. (WebKit::MockNfcService::detectTags const): Ditto. * Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::platformSetNetworkParameters): Define WebKit2HTTPProxyDefaultsKey and WebKit2HTTPSProxyDefaultsKey * Tools/TestWebKitAPI/Tests/WebKitCocoa/TextWidth.mm: (TEST(WebKit, TextWidth)): Use CFString literal. Canonical link: https://commits.webkit.org/282741@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes