Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e3f4bc0b561fa968e18dcf600564d102fdb0bc9c
      
https://github.com/WebKit/WebKit/commit/e3f4bc0b561fa968e18dcf600564d102fdb0bc9c
  Author: Chris Dumez <cdu...@apple.com>
  Date:   2025-04-09 (Wed, 09 Apr 2025)

  Changed paths:
    M Source/WTF/wtf/UUID.h
    M Source/WTF/wtf/cocoa/UUIDCocoa.mm
    M Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKFrameInfo.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebExtensionControllerConfiguration.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
    M Source/WebKit/UIProcess/API/Cocoa/_WKNotificationData.mm
    M Source/WebKit/UIProcess/API/Cocoa/_WKResourceLoadInfo.mm
    M Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm
    M Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.mm
    M Source/WebKit/UIProcess/mac/WebViewImpl.mm
    M Tools/TestWebKitAPI/Tests/WTF/cocoa/UUIDCocoa.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm

  Log Message:
  -----------
  WTF::UUID's `operator NSUUID *()` is leak-prone
https://bugs.webkit.org/show_bug.cgi?id=291324

Reviewed by Ryosuke Niwa.

This implicit type conversion operator returned a NSUUID that had +1 refcount, 
which
is very unexpected and prone to leaking. Drop this operator and introduce a 
createNSUUID()
function instead which returns a NSUUID.

The operator had several call sites, one of them using ARC so no leak. The 
other call sites
were leaking memory however.

* Source/WTF/wtf/UUID.h:
* Source/WTF/wtf/cocoa/UUIDCocoa.mm:
(WTF::UUID::createNSUUID const):
(WTF::UUID::operator NSUUID * const): Deleted.
* Source/WebKit/UIProcess/API/Cocoa/WKWebExtensionControllerConfiguration.mm:
(-[WKWebExtensionControllerConfiguration identifier]):

Canonical link: https://commits.webkit.org/293482@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

Reply via email to