From 0ac873459e826d4cfb01685310101bb3fa3c22bb Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 2 Jul 2021 10:58:18 +0900 Subject: [PATCH 1/2] fix: do not leak NSUUID --- shell/browser/notifications/mac/cocoa_notification.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/browser/notifications/mac/cocoa_notification.mm b/shell/browser/notifications/mac/cocoa_notification.mm index 78d6e41976ab6..423abe32d11be 100644 --- a/shell/browser/notifications/mac/cocoa_notification.mm +++ b/shell/browser/notifications/mac/cocoa_notification.mm @@ -33,7 +33,7 @@ NSString* identifier = [NSString stringWithFormat:@"%@:notification:%@", [[NSBundle mainBundle] bundleIdentifier], - [[[NSUUID alloc] init] UUIDString]]; + [[NSUUID UUID] UUIDString]]]; [notification_ setTitle:base::SysUTF16ToNSString(options.title)]; [notification_ setSubtitle:base::SysUTF16ToNSString(options.subtitle)]; From 92b37e8224f06d28dba56ad47da5d26c24a0b3a1 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 5 Jul 2021 15:26:11 +0900 Subject: [PATCH 2/2] Fix build error --- shell/browser/notifications/mac/cocoa_notification.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/browser/notifications/mac/cocoa_notification.mm b/shell/browser/notifications/mac/cocoa_notification.mm index 423abe32d11be..b8fcf4b04e985 100644 --- a/shell/browser/notifications/mac/cocoa_notification.mm +++ b/shell/browser/notifications/mac/cocoa_notification.mm @@ -33,7 +33,7 @@ NSString* identifier = [NSString stringWithFormat:@"%@:notification:%@", [[NSBundle mainBundle] bundleIdentifier], - [[NSUUID UUID] UUIDString]]]; + [[NSUUID UUID] UUIDString]]; [notification_ setTitle:base::SysUTF16ToNSString(options.title)]; [notification_ setSubtitle:base::SysUTF16ToNSString(options.subtitle)];