Crashes under WebSelectionServiceController::hasRelevantSelectionServices
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Oct 2014 19:03:38 +0000 (19:03 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Oct 2014 19:03:38 +0000 (19:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=138013

Reviewed by Dan Bernstein.

* WebCoreSupport/WebSelectionServiceController.mm:
(WebSelectionServiceController::hasRelevantSelectionServices):
Don't adopt this autoreleased object.

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

Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebSelectionServiceController.mm

index ec0702801ce676f78b7275e8d770252683f96247..24767ca7a1111f3ef61db20dbfa4bc81bfe87962 100644 (file)
@@ -1,3 +1,14 @@
+2014-10-23  Tim Horton  <timothy_horton@apple.com>
+
+        Crashes under WebSelectionServiceController::hasRelevantSelectionServices
+        https://bugs.webkit.org/show_bug.cgi?id=138013
+
+        Reviewed by Dan Bernstein.
+
+        * WebCoreSupport/WebSelectionServiceController.mm:
+        (WebSelectionServiceController::hasRelevantSelectionServices):
+        Don't adopt this autoreleased object.
+
 2014-10-22  Chris Dumez  <cdumez@apple.com>
 
         [Mac][WK2] Fix applicationIsSafari() detection
index daca9f6b6439749c4c6e887122f195a696d52a4e..2711a5d77a9cec355ed8545d75b6d39cc046e05b 100644 (file)
@@ -99,7 +99,7 @@ bool WebSelectionServiceController::hasRelevantSelectionServices(bool isTextOnly
     RetainPtr<NSImage> image = adoptNS([[NSImage alloc] init]);
     NSTextAttachmentCell *cell = [[NSTextAttachmentCell alloc] initImageCell:image.get()];
     [attachment setAttachmentCell:cell];
-    RetainPtr<NSMutableAttributedString> attributedStringWithRichContent = adoptNS((NSMutableAttributedString *)[NSMutableAttributedString attributedStringWithAttachment:attachment]);
+    RetainPtr<NSMutableAttributedString> attributedStringWithRichContent = (NSMutableAttributedString *)[NSMutableAttributedString attributedStringWithAttachment:attachment];
     [attributedStringWithRichContent appendAttributedString:attributedString.get()];
 
     bool hasRichContentServices = hasCompatibleServicesForItems(@[ attributedStringWithRichContent.get() ]);