Title: [282577] branches/safari-612-branch/Source/WebKit
Revision
282577
Author
[email protected]
Date
2021-09-16 11:48:38 -0700 (Thu, 16 Sep 2021)

Log Message

Cherry-pick r282349. rdar://problem/83183743

    Followup to r282320 - avoid a potential memory leak
    https://bugs.webkit.org/show_bug.cgi?id=230187
    <rdar://problem/81436658>

    Patch by Wenson Hsieh <[email protected]> on 2021-09-13
    Reviewed by Myles C. Maxfield.

    Use `adoptCF` to prevent leaking the last resort font descriptor.

    * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
    (IPC::createCTFont):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@282349 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-612-branch/Source/WebKit/ChangeLog (282576 => 282577)


--- branches/safari-612-branch/Source/WebKit/ChangeLog	2021-09-16 18:48:35 UTC (rev 282576)
+++ branches/safari-612-branch/Source/WebKit/ChangeLog	2021-09-16 18:48:38 UTC (rev 282577)
@@ -1,5 +1,36 @@
 2021-09-16  Russell Epstein  <[email protected]>
 
+        Cherry-pick r282349. rdar://problem/83183743
+
+    Followup to r282320 - avoid a potential memory leak
+    https://bugs.webkit.org/show_bug.cgi?id=230187
+    <rdar://problem/81436658>
+    
+    Patch by Wenson Hsieh <[email protected]> on 2021-09-13
+    Reviewed by Myles C. Maxfield.
+    
+    Use `adoptCF` to prevent leaking the last resort font descriptor.
+    
+    * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
+    (IPC::createCTFont):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@282349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-09-13  Wenson Hsieh  <[email protected]>
+
+            Followup to r282320 - avoid a potential memory leak
+            https://bugs.webkit.org/show_bug.cgi?id=230187
+            <rdar://problem/81436658>
+
+            Reviewed by Myles C. Maxfield.
+
+            Use `adoptCF` to prevent leaking the last resort font descriptor.
+
+            * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
+            (IPC::createCTFont):
+
+2021-09-16  Russell Epstein  <[email protected]>
+
         Cherry-pick r282320. rdar://problem/83183743
 
     [Cocoa] Drawing the rounded system ui font into canvas causes a crash

Modified: branches/safari-612-branch/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm (282576 => 282577)


--- branches/safari-612-branch/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm	2021-09-16 18:48:35 UTC (rev 282576)
+++ branches/safari-612-branch/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm	2021-09-16 18:48:38 UTC (rev 282577)
@@ -515,7 +515,7 @@
     fontDescriptor = findFontDescriptor(referenceURL, desiredPostScriptName);
     if (!fontDescriptor) {
         ASSERT_NOT_REACHED();
-        fontDescriptor = CTFontDescriptorCreateLastResort();
+        fontDescriptor = adoptCF(CTFontDescriptorCreateLastResort());
     }
     ASSERT(fontDescriptor);
     return adoptCF(CTFontCreateWithFontDescriptorAndOptions(fontDescriptor.get(), size, nullptr, kCTFontOptionsSystemUIFont));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to