[Cocoa] NSFileWrapper associated with _WKAttachment
authorpecoraro@apple.com <pecoraro@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Jun 2019 22:52:24 +0000 (22:52 +0000)
committerpecoraro@apple.com <pecoraro@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Jun 2019 22:52:24 +0000 (22:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=198871
<rdar://problem/51760625>

Reviewed by Wenson Hsieh.

* UIProcess/API/Cocoa/_WKAttachment.mm:
(-[_WKAttachment dealloc]):
Ensure we destruct the API::Object associated with this so RetainPtrs can release.

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/_WKAttachment.mm

index f708a95..32f1d51 100644 (file)
@@ -1,3 +1,15 @@
+2019-06-14  Joseph Pecoraro  <pecoraro@apple.com>
+
+        [Cocoa] NSFileWrapper associated with _WKAttachment
+        https://bugs.webkit.org/show_bug.cgi?id=198871
+        <rdar://problem/51760625>
+
+        Reviewed by Wenson Hsieh.
+
+        * UIProcess/API/Cocoa/_WKAttachment.mm:
+        (-[_WKAttachment dealloc]):
+        Ensure we destruct the API::Object associated with this so RetainPtrs can release.
+
 2019-06-14  Tim Horton  <timothy_horton@apple.com>
 
         WebKit's NSAttributedString.h is not included in the WebKit.h umbrella header
index 4549605..00d964f 100644 (file)
@@ -102,6 +102,13 @@ static const NSInteger InvalidAttachmentErrorCode = 2;
 
 @implementation _WKAttachment
 
+- (void)dealloc
+{
+    _attachment->~Attachment();
+
+    [super dealloc];
+}
+
 - (API::Object&)_apiObject
 {
     return *_attachment;