Title: [214910] trunk/Source/WebKit/mac
Revision
214910
Author
[email protected]
Date
2017-04-04 15:57:22 -0700 (Tue, 04 Apr 2017)

Log Message

Fix leaks in WebUITextIndicatorData
https://bugs.webkit.org/show_bug.cgi?id=170480

Reviewed by Wenson Hsieh.

Removes extraneous retains.

* WebView/WebView.mm:
(-[WebUITextIndicatorData initWithImage:textIndicatorData:scale:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (214909 => 214910)


--- trunk/Source/WebKit/mac/ChangeLog	2017-04-04 22:48:40 UTC (rev 214909)
+++ trunk/Source/WebKit/mac/ChangeLog	2017-04-04 22:57:22 UTC (rev 214910)
@@ -1,3 +1,15 @@
+2017-04-04  Megan Gardner  <[email protected]>
+
+        Fix leaks in WebUITextIndicatorData
+        https://bugs.webkit.org/show_bug.cgi?id=170480
+
+        Reviewed by Wenson Hsieh.
+
+        Removes extraneous retains.
+
+        * WebView/WebView.mm:
+        (-[WebUITextIndicatorData initWithImage:textIndicatorData:scale:]):
+
 2017-04-04  Tim Horton  <[email protected]>
 
         [Mac] -[WKWebView findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:] invokes the resultCollector with didWrap = NO even when it wraps

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (214909 => 214910)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2017-04-04 22:48:40 UTC (rev 214909)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2017-04-04 22:57:22 UTC (rev 214910)
@@ -649,7 +649,7 @@
     if (!(self = [super init]))
         return nil;
     
-    _dataInteractionImage = [[[getUIImageClass() alloc] initWithCGImage:image scale:scale orientation:UIImageOrientationDownMirrored] retain];
+    _dataInteractionImage = [[getUIImageClass() alloc] initWithCGImage:image scale:scale orientation:UIImageOrientationDownMirrored];
     _selectionRectInRootViewCoordinates = indicatorData.selectionRectInRootViewCoordinates;
     _textBoundingRectInRootViewCoordinates = indicatorData.textBoundingRectInRootViewCoordinates;
     
@@ -659,20 +659,20 @@
     _textRectsInBoundingRectCoordinates = [[NSArray arrayWithArray:textRectsInBoundingRectCoordinates] retain];
     _contentImageScaleFactor = indicatorData.contentImageScaleFactor;
     if (indicatorData.contentImageWithHighlight)
-        _contentImageWithHighlight = [[[getUIImageClass() alloc] initWithCGImage:indicatorData.contentImageWithHighlight.get()->nativeImage().get() scale:scale orientation:UIImageOrientationDownMirrored] retain];
+        _contentImageWithHighlight = [[getUIImageClass() alloc] initWithCGImage:indicatorData.contentImageWithHighlight.get()->nativeImage().get() scale:scale orientation:UIImageOrientationDownMirrored];
     if (indicatorData.contentImage)
-        _contentImage = [[[getUIImageClass() alloc] initWithCGImage:indicatorData.contentImage.get()->nativeImage().get() scale:scale orientation:UIImageOrientationUp] retain];
+        _contentImage = [[getUIImageClass() alloc] initWithCGImage:indicatorData.contentImage.get()->nativeImage().get() scale:scale orientation:UIImageOrientationUp];
 
     if (indicatorData.contentImageWithoutSelection) {
         auto nativeImage = indicatorData.contentImageWithoutSelection.get()->nativeImage();
         if (nativeImage) {
-            _contentImageWithoutSelection = [[[getUIImageClass() alloc] initWithCGImage:nativeImage.get() scale:scale orientation:UIImageOrientationUp] retain];
+            _contentImageWithoutSelection = [[getUIImageClass() alloc] initWithCGImage:nativeImage.get() scale:scale orientation:UIImageOrientationUp];
             _contentImageWithoutSelectionRectInRootViewCoordinates = indicatorData.contentImageWithoutSelectionRectInRootViewCoordinates;
         }
     }
 
     if (indicatorData.options & TextIndicatorOptionComputeEstimatedBackgroundColor)
-        _estimatedBackgroundColor = [[[getUIColorClass() alloc] initWithCGColor:cachedCGColor(indicatorData.estimatedBackgroundColor)] retain];
+        _estimatedBackgroundColor = [[getUIColorClass() alloc] initWithCGColor:cachedCGColor(indicatorData.estimatedBackgroundColor)];
 
     return self;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to