<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[199960] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/199960">199960</a></dd>
<dt>Author</dt> <dd>aestes@apple.com</dd>
<dt>Date</dt> <dd>2016-04-23 19:49:49 -0700 (Sat, 23 Apr 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fix issues found by the clang static analyzer
https://bugs.webkit.org/show_bug.cgi?id=156956
Reviewed by Alexey Proskuryakov.
Source/WebCore:
* editing/cocoa/DataDetection.mm:
(WebCore::DataDetection::detectContentInRange): Stored tz in a RetainPtr.
* platform/cf/KeyedDecoderCF.cpp:
(WebCore::KeyedDecoderCF::KeyedDecoderCF): If dynamic_cf_cast returned nullptr, the result of
CFPropertyListCreateWithData would leak. Stored the CFPropertyListRef in a RetainPtr, then leaked/adopted it
into m_rootDictionary (to avoid retain count churn) if it is a CFDictionary.
* platform/ios/WebAVPlayerController.mm:
(-[WebAVPlayerController dealloc]): Released _externalPlaybackAirPlayDeviceLocalizedName.
(-[WebAVMediaSelectionOption dealloc]): Added to release _localizedDisplayName.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerLayer dealloc]): Released _pixelBufferAttributes.
* platform/network/cocoa/WebCoreNSURLSession.h: Removed the readwrite attributes from properties, since
properties are readwrite by default.
* platform/network/cocoa/WebCoreNSURLSession.mm: Removed @dynamic, which isn't necessary just for defining a custom getter.
(-[WebCoreNSURLSessionDataTask dealloc]): Added to release copied ivars.
Source/WebKit/mac:
* WebView/WebDeviceOrientationProviderMock.mm:
(-[WebDeviceOrientationProviderMock dealloc]): [super dealloc] should be called last.
Source/WebKit2:
* UIProcess/API/Cocoa/WKPreviewActionItem.mm:
(-[WKPreviewAction dealloc]): Added to release _identifier.
* UIProcess/_WKWebViewPrintFormatter.mm:
(-[_WKWebViewPrintFormatter dealloc]): Released _frameToPrint.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView inputView]): -createPeripheralWithView: returned a retained object, but the method name did not
match Cocoa conventions. Called -initWithView: instead.
(-[WKContentView _showAttachmentSheet]): Stored the _WKActivatedElementInfo in a RetainPtr.
(-[WKContentView _dataForPreviewItemController:atPosition:type:]): Ditto.
(+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
The properties contextBeforeSelection, selectedText, markedText, and contextAfterSelection have the 'copy'
annotation in UIWKAutocorrectionContext, so the additional copy made here would be leaked. Removed the extra copy.
(-[WKAutocorrectionContext dealloc]): Deleted.
* UIProcess/ios/forms/WKFormInputControl.h: Removed -createPeripheralWithView: and declared -initWithView:.
* UIProcess/ios/forms/WKFormInputControl.mm:
(-[WKFormInputControl initWithView:]): Changed to return instancetype.
(+[WKFormInputControl createPeripheralWithView:]): Deleted.
* UIProcess/ios/forms/WKFormSelectControl.h: Removed -createPeripheralWithView: and declared -initWithView:.
* UIProcess/ios/forms/WKFormSelectControl.mm:
(+[WKFormSelectControl createPeripheralWithView:]): Deleted.
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeLegacySessionState): If dynamic_cf_cast returned nullptr, the result of
CFPropertyListCreateWithData would leak. Stored the CFPropertyListRef in a RetainPtr before calling dynamic_cf_cast.
* UIProcess/mac/ServicesController.mm:
(WebKit::ServicesController::refreshExistingServices): Used a RetainPtr for attachment and cell.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu): Used a RetainPtr for groupEntry.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreeditingcocoaDataDetectionmm">trunk/Source/WebCore/editing/cocoa/DataDetection.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformcfKeyedDecoderCFcpp">trunk/Source/WebCore/platform/cf/KeyedDecoderCF.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformiosWebAVPlayerControllermm">trunk/Source/WebCore/platform/ios/WebAVPlayerController.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformiosWebVideoFullscreenInterfaceAVKitmm">trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcocoaWebCoreNSURLSessionh">trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcocoaWebCoreNSURLSessionmm">trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebDeviceOrientationProviderMockmm">trunk/Source/WebKit/mac/WebView/WebDeviceOrientationProviderMock.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKPreviewActionItemmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreviewActionItem.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcess_WKWebViewPrintFormattermm">trunk/Source/WebKit2/UIProcess/_WKWebViewPrintFormatter.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewInteractionmm">trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosformsWKFormInputControlh">trunk/Source/WebKit2/UIProcess/ios/forms/WKFormInputControl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosformsWKFormInputControlmm">trunk/Source/WebKit2/UIProcess/ios/forms/WKFormInputControl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosformsWKFormSelectControlh">trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosformsWKFormSelectControlmm">trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacLegacySessionStateCodingcpp">trunk/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacServicesControllermm">trunk/Source/WebKit2/UIProcess/mac/ServicesController.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebContextMenuProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebCore/ChangeLog        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2016-04-23 Andy Estes <aestes@apple.com>
+
+ Fix issues found by the clang static analyzer
+ https://bugs.webkit.org/show_bug.cgi?id=156956
+
+ Reviewed by Alexey Proskuryakov.
+
+ * editing/cocoa/DataDetection.mm:
+ (WebCore::DataDetection::detectContentInRange): Stored tz in a RetainPtr.
+ * platform/cf/KeyedDecoderCF.cpp:
+ (WebCore::KeyedDecoderCF::KeyedDecoderCF): If dynamic_cf_cast returned nullptr, the result of
+ CFPropertyListCreateWithData would leak. Stored the CFPropertyListRef in a RetainPtr, then leaked/adopted it
+ into m_rootDictionary (to avoid retain count churn) if it is a CFDictionary.
+ * platform/ios/WebAVPlayerController.mm:
+ (-[WebAVPlayerController dealloc]): Released _externalPlaybackAirPlayDeviceLocalizedName.
+ (-[WebAVMediaSelectionOption dealloc]): Added to release _localizedDisplayName.
+ * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
+ (-[WebAVPlayerLayer dealloc]): Released _pixelBufferAttributes.
+ * platform/network/cocoa/WebCoreNSURLSession.h: Removed the readwrite attributes from properties, since
+ properties are readwrite by default.
+ * platform/network/cocoa/WebCoreNSURLSession.mm: Removed @dynamic, which isn't necessary just for defining a custom getter.
+ (-[WebCoreNSURLSessionDataTask dealloc]): Added to release copied ivars.
+
</ins><span class="cx"> 2016-04-23 Dan Bernstein <mitz@apple.com>
</span><span class="cx">
</span><span class="cx"> <rdar://problem/25894586> A project has failed to build because WTF_MAKE_FAST_ALLOCATED was not defined
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingcocoaDataDetectionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/cocoa/DataDetection.mm        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -550,7 +550,7 @@
</span><span class="cx"> allResultRanges.append(WTFMove(fragmentRanges));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- CFTimeZoneRef tz = CFTimeZoneCopyDefault();
</del><ins>+ auto tz = adoptCF(CFTimeZoneCopyDefault());
</ins><span class="cx"> NSDate *referenceDate = [NSDate date];
</span><span class="cx"> Text* lastTextNodeToUpdate = nullptr;
</span><span class="cx"> String lastNodeContent;
</span><span class="lines">@@ -582,7 +582,7 @@
</span><span class="cx"> rangeBoundaries.uncheckedAppend({ range->startPosition(), range->endPosition() });
</span><span class="cx">
</span><span class="cx"> NSString *identifier = dataDetectorStringForPath(indexPaths[resultIndex].get());
</span><del>- NSString *correspondingURL = constructURLStringForResult(coreResult, identifier, referenceDate, (NSTimeZone *)tz, types);
</del><ins>+ NSString *correspondingURL = constructURLStringForResult(coreResult, identifier, referenceDate, (NSTimeZone *)tz.get(), types);
</ins><span class="cx"> bool didModifyDOM = false;
</span><span class="cx">
</span><span class="cx"> if (!correspondingURL || searchForLinkRemovingExistingDDLinks(resultRanges.first()->startContainer(), resultRanges.last()->endContainer(), didModifyDOM))
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformcfKeyedDecoderCFcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/cf/KeyedDecoderCF.cpp (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cf/KeyedDecoderCF.cpp        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebCore/platform/cf/KeyedDecoderCF.cpp        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -39,9 +39,10 @@
</span><span class="cx"> KeyedDecoderCF::KeyedDecoderCF(const uint8_t* data, size_t size)
</span><span class="cx"> {
</span><span class="cx"> auto cfData = adoptCF(CFDataCreateWithBytesNoCopy(kCFAllocatorDefault, data, size, kCFAllocatorNull));
</span><ins>+ auto cfPropertyList = adoptCF(CFPropertyListCreateWithData(kCFAllocatorDefault, cfData.get(), kCFPropertyListImmutable, nullptr, nullptr));
</ins><span class="cx">
</span><del>- if (auto rootDictionary = adoptCF(dynamic_cf_cast<CFDictionaryRef>(CFPropertyListCreateWithData(kCFAllocatorDefault, cfData.get(), kCFPropertyListImmutable, nullptr, nullptr))))
- m_rootDictionary = WTFMove(rootDictionary);
</del><ins>+ if (dynamic_cf_cast<CFDictionaryRef>(cfPropertyList.get()))
+ m_rootDictionary = adoptCF(static_cast<CFDictionaryRef>(cfPropertyList.leakRef()));
</ins><span class="cx"> else
</span><span class="cx"> m_rootDictionary = adoptCF(CFDictionaryCreate(kCFAllocatorDefault, nullptr, nullptr, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
</span><span class="cx"> m_dictionaryStack.append(m_rootDictionary.get());
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosWebAVPlayerControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/WebAVPlayerController.mm (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/WebAVPlayerController.mm        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebCore/platform/ios/WebAVPlayerController.mm        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -71,6 +71,7 @@
</span><span class="cx"> [_legibleMediaSelectionOptions release];
</span><span class="cx"> [_currentAudioMediaSelectionOption release];
</span><span class="cx"> [_currentLegibleMediaSelectionOption release];
</span><ins>+ [_externalPlaybackAirPlayDeviceLocalizedName release];
</ins><span class="cx"> [super dealloc];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -453,6 +454,13 @@
</span><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> @implementation WebAVMediaSelectionOption
</span><ins>+
+- (void)dealloc
+{
+ [_localizedDisplayName release];
+ [super dealloc];
+}
+
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> #endif // PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosWebVideoFullscreenInterfaceAVKitmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -234,6 +234,7 @@
</span><span class="cx"> - (void)dealloc
</span><span class="cx"> {
</span><span class="cx"> [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(resolveBounds) object:nil];
</span><ins>+ [_pixelBufferAttributes release];
</ins><span class="cx"> [super dealloc];
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcocoaWebCoreNSURLSessionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.h (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.h        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.h        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -119,16 +119,17 @@
</span><span class="cx"> NSString *_taskDescription;
</span><span class="cx"> float _priority;
</span><span class="cx"> }
</span><del>-@property (readwrite) NSUInteger taskIdentifier;
-@property (readwrite, copy) NSURLRequest *originalRequest;
-@property (readwrite, copy) NSURLRequest *currentRequest;
</del><ins>+
+@property NSUInteger taskIdentifier;
+@property (copy) NSURLRequest *originalRequest;
+@property (copy) NSURLRequest *currentRequest;
</ins><span class="cx"> @property (readonly, copy) NSURLResponse *response;
</span><del>-@property (readwrite) int64_t countOfBytesReceived;
-@property (readwrite) int64_t countOfBytesSent;
-@property (readwrite) int64_t countOfBytesExpectedToSend;
-@property (readwrite) int64_t countOfBytesExpectedToReceive;
-@property (readwrite) NSURLSessionTaskState state;
-@property (readwrite, copy) NSError *error;
</del><ins>+@property int64_t countOfBytesReceived;
+@property int64_t countOfBytesSent;
+@property int64_t countOfBytesExpectedToSend;
+@property int64_t countOfBytesExpectedToReceive;
+@property NSURLSessionTaskState state;
+@property (copy) NSError *error;
</ins><span class="cx"> @property (copy) NSString *taskDescription;
</span><span class="cx"> @property float priority;
</span><span class="cx"> - (void)cancel;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcocoaWebCoreNSURLSessionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -457,7 +457,7 @@
</span><span class="cx"> @synthesize error=_error;
</span><span class="cx"> @synthesize taskDescription=_taskDescription;
</span><span class="cx"> @synthesize priority=_priority;
</span><del>-@dynamic response;
</del><ins>+
</ins><span class="cx"> - (NSURLResponse *)response
</span><span class="cx"> {
</span><span class="cx"> return _response.get();
</span><span class="lines">@@ -497,6 +497,15 @@
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (void)dealloc
+{
+ [_originalRequest release];
+ [_currentRequest release];
+ [_error release];
+ [_taskDescription release];
+ [super dealloc];
+}
+
</ins><span class="cx"> #pragma mark - NSURLSession SPI
</span><span class="cx">
</span><span class="cx"> - (NSDictionary *)_timingData
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-04-23 Andy Estes <aestes@apple.com>
+
+ Fix issues found by the clang static analyzer
+ https://bugs.webkit.org/show_bug.cgi?id=156956
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebView/WebDeviceOrientationProviderMock.mm:
+ (-[WebDeviceOrientationProviderMock dealloc]): [super dealloc] should be called last.
+
</ins><span class="cx"> 2016-04-21 Tim Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> Fix the iOS build: WAKView may not respond to drawLayer:inContext:
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebDeviceOrientationProviderMockmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebDeviceOrientationProviderMock.mm (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebDeviceOrientationProviderMock.mm        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebKit/mac/WebView/WebDeviceOrientationProviderMock.mm        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -95,8 +95,8 @@
</span><span class="cx">
</span><span class="cx"> - (void)dealloc
</span><span class="cx"> {
</span><ins>+ [m_internal release];
</ins><span class="cx"> [super dealloc];
</span><del>- [m_internal release];
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)setOrientation:(WebDeviceOrientation*)orientation
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebKit2/ChangeLog        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2016-04-23 Andy Estes <aestes@apple.com>
+
+ Fix issues found by the clang static analyzer
+ https://bugs.webkit.org/show_bug.cgi?id=156956
+
+ Reviewed by Alexey Proskuryakov.
+
+ * UIProcess/API/Cocoa/WKPreviewActionItem.mm:
+ (-[WKPreviewAction dealloc]): Added to release _identifier.
+ * UIProcess/_WKWebViewPrintFormatter.mm:
+ (-[_WKWebViewPrintFormatter dealloc]): Released _frameToPrint.
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView inputView]): -createPeripheralWithView: returned a retained object, but the method name did not
+ match Cocoa conventions. Called -initWithView: instead.
+ (-[WKContentView _showAttachmentSheet]): Stored the _WKActivatedElementInfo in a RetainPtr.
+ (-[WKContentView _dataForPreviewItemController:atPosition:type:]): Ditto.
+ (+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
+ The properties contextBeforeSelection, selectedText, markedText, and contextAfterSelection have the 'copy'
+ annotation in UIWKAutocorrectionContext, so the additional copy made here would be leaked. Removed the extra copy.
+ (-[WKAutocorrectionContext dealloc]): Deleted.
+ * UIProcess/ios/forms/WKFormInputControl.h: Removed -createPeripheralWithView: and declared -initWithView:.
+ * UIProcess/ios/forms/WKFormInputControl.mm:
+ (-[WKFormInputControl initWithView:]): Changed to return instancetype.
+ (+[WKFormInputControl createPeripheralWithView:]): Deleted.
+ * UIProcess/ios/forms/WKFormSelectControl.h: Removed -createPeripheralWithView: and declared -initWithView:.
+ * UIProcess/ios/forms/WKFormSelectControl.mm:
+ (+[WKFormSelectControl createPeripheralWithView:]): Deleted.
+ * UIProcess/mac/LegacySessionStateCoding.cpp:
+ (WebKit::decodeLegacySessionState): If dynamic_cf_cast returned nullptr, the result of
+ CFPropertyListCreateWithData would leak. Stored the CFPropertyListRef in a RetainPtr before calling dynamic_cf_cast.
+ * UIProcess/mac/ServicesController.mm:
+ (WebKit::ServicesController::refreshExistingServices): Used a RetainPtr for attachment and cell.
+ * UIProcess/mac/WebContextMenuProxyMac.mm:
+ (WebKit::WebContextMenuProxyMac::setupServicesMenu): Used a RetainPtr for groupEntry.
+
</ins><span class="cx"> 2016-04-23 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> Tie the DiagnosticLoggingClient's lifetime to the Page
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKPreviewActionItemmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreviewActionItem.mm (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreviewActionItem.mm        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreviewActionItem.mm        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -45,6 +45,12 @@
</span><span class="cx"> return action;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (void)dealloc
+{
+ [_identifier release];
+ [super dealloc];
+}
+
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> #endif // WK_API_ENABLED && TARGET_OS_IPHONE
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcess_WKWebViewPrintFormattermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/_WKWebViewPrintFormatter.mm (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/_WKWebViewPrintFormatter.mm        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebKit2/UIProcess/_WKWebViewPrintFormatter.mm        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -49,6 +49,7 @@
</span><span class="cx"> - (void)dealloc
</span><span class="cx"> {
</span><span class="cx"> [self.webView _endPrinting];
</span><ins>+ [_frameToPrint release];
</ins><span class="cx"> [super dealloc];
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewInteractionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -1066,7 +1066,7 @@
</span><span class="cx"> return nil;
</span><span class="cx">
</span><span class="cx"> if (!_inputPeripheral)
</span><del>- _inputPeripheral = adoptNS(_assistedNodeInformation.elementType == InputType::Select ? [WKFormSelectControl createPeripheralWithView:self] : [WKFormInputControl createPeripheralWithView:self]);
</del><ins>+ _inputPeripheral = adoptNS(_assistedNodeInformation.elementType == InputType::Select ? [[WKFormSelectControl alloc] initWithView:self] : [[WKFormInputControl alloc] initWithView:self]);
</ins><span class="cx"> else
</span><span class="cx"> [self _displayFormNodeInputView];
</span><span class="cx">
</span><span class="lines">@@ -1138,9 +1138,11 @@
</span><span class="cx"> - (void)_showAttachmentSheet
</span><span class="cx"> {
</span><span class="cx"> id <WKUIDelegatePrivate> uiDelegate = static_cast<id <WKUIDelegatePrivate>>([_webView UIDelegate]);
</span><del>-
- if ([uiDelegate respondsToSelector:@selector(_webView:showCustomSheetForElement:)])
- [uiDelegate _webView:_webView showCustomSheetForElement:[[_WKActivatedElementInfo alloc] _initWithType:_WKActivatedElementTypeAttachment URL:[NSURL _web_URLWithWTFString:_positionInformation.url] location:_positionInformation.point title:_positionInformation.title ID:_positionInformation.idAttribute rect:_positionInformation.bounds image:nil]];
</del><ins>+ if (![uiDelegate respondsToSelector:@selector(_webView:showCustomSheetForElement:)])
+ return;
+
+ auto element = adoptNS([[_WKActivatedElementInfo alloc] _initWithType:_WKActivatedElementTypeAttachment URL:[NSURL _web_URLWithWTFString:_positionInformation.url] location:_positionInformation.point title:_positionInformation.title ID:_positionInformation.idAttribute rect:_positionInformation.bounds image:nil]);
+ [uiDelegate _webView:_webView showCustomSheetForElement:element.get()];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)_showLinkSheet
</span><span class="lines">@@ -3914,8 +3916,8 @@
</span><span class="cx"> // FIXME: Should use UIKit constants.
</span><span class="cx"> enum { WKUIPreviewItemTypeAttachment = 5 };
</span><span class="cx"> *type = static_cast<UIPreviewItemType>(WKUIPreviewItemTypeAttachment);
</span><del>- const auto& element = [[_WKActivatedElementInfo alloc] _initWithType:_WKActivatedElementTypeAttachment URL:[NSURL _web_URLWithWTFString:_positionInformation.url] location:_positionInformation.point title:_positionInformation.title ID:_positionInformation.idAttribute rect:_positionInformation.bounds image:nil];
- NSUInteger index = [uiDelegate _webView:_webView indexIntoAttachmentListForElement:element];
</del><ins>+ auto element = adoptNS([[_WKActivatedElementInfo alloc] _initWithType:_WKActivatedElementTypeAttachment URL:[NSURL _web_URLWithWTFString:_positionInformation.url] location:_positionInformation.point title:_positionInformation.title ID:_positionInformation.idAttribute rect:_positionInformation.bounds image:nil]);
+ NSUInteger index = [uiDelegate _webView:_webView indexIntoAttachmentListForElement:element.get()];
</ins><span class="cx"> if (index != NSNotFound) {
</span><span class="cx"> dataForPreview[@"UIPreviewDataAttachmentList"] = [uiDelegate _attachmentListForWebView:_webView];
</span><span class="cx"> dataForPreview[@"UIPreviewDataAttachmentIndex"] = [NSNumber numberWithUnsignedInteger:index];
</span><span class="lines">@@ -4296,27 +4298,17 @@
</span><span class="cx"> WKAutocorrectionContext *context = [[WKAutocorrectionContext alloc] init];
</span><span class="cx">
</span><span class="cx"> if ([beforeText length])
</span><del>- context.contextBeforeSelection = [beforeText copy];
</del><ins>+ context.contextBeforeSelection = beforeText;
</ins><span class="cx"> if ([selectedText length])
</span><del>- context.selectedText = [selectedText copy];
</del><ins>+ context.selectedText = selectedText;
</ins><span class="cx"> if ([markedText length])
</span><del>- context.markedText = [markedText copy];
</del><ins>+ context.markedText = markedText;
</ins><span class="cx"> if ([afterText length])
</span><del>- context.contextAfterSelection = [afterText copy];
</del><ins>+ context.contextAfterSelection = afterText;
</ins><span class="cx"> context.rangeInMarkedText = range;
</span><span class="cx"> return [context autorelease];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)dealloc
-{
- [self.contextBeforeSelection release];
- [self.markedText release];
- [self.selectedText release];
- [self.contextAfterSelection release];
-
- [super dealloc];
-}
-
</del><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> #endif // PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosformsWKFormInputControlh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/forms/WKFormInputControl.h (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/forms/WKFormInputControl.h        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebKit2/UIProcess/ios/forms/WKFormInputControl.h        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> @class WKContentView;
</span><span class="cx">
</span><span class="cx"> @interface WKFormInputControl : NSObject<WKFormPeripheral>
</span><del>-+ (WKFormInputControl *)createPeripheralWithView:(WKContentView *)view;
</del><ins>+- (instancetype)initWithView:(WKContentView *)view;
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> #endif // PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosformsWKFormInputControlmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/forms/WKFormInputControl.mm (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/forms/WKFormInputControl.mm        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebKit2/UIProcess/ios/forms/WKFormInputControl.mm        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -225,7 +225,7 @@
</span><span class="cx"> RetainPtr<id<WKFormControl>> _control;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (id)initWithView:(WKContentView *)view
</del><ins>+- (instancetype)initWithView:(WKContentView *)view
</ins><span class="cx"> {
</span><span class="cx"> if (!(self = [super init]))
</span><span class="cx"> return nil;
</span><span class="lines">@@ -263,11 +263,6 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><del>-+ (WKFormInputControl *)createPeripheralWithView:(WKContentView *)view
-{
- return [[WKFormInputControl alloc] initWithView:view];
-}
-
</del><span class="cx"> - (void)beginEditing
</span><span class="cx"> {
</span><span class="cx"> [_control controlBeginEditing];
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosformsWKFormSelectControlh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.h (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.h        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.h        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> @class WKContentView;
</span><span class="cx">
</span><span class="cx"> @interface WKFormSelectControl : NSObject<WKFormPeripheral>
</span><del>-+ (WKFormSelectControl *)createPeripheralWithView:(WKContentView *)view;
</del><ins>+- (instancetype)initWithView:(WKContentView *)view;
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> @interface WKSelectPopover : WKFormRotatingAccessoryPopover<WKFormControl>
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosformsWKFormSelectControlmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.mm (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.mm        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebKit2/UIProcess/ios/forms/WKFormSelectControl.mm        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -84,11 +84,6 @@
</span><span class="cx"> return self;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-+ (WKFormSelectControl *)createPeripheralWithView:(WKContentView *)view
-{
- return [[WKFormSelectControl alloc] initWithView:view];
-}
-
</del><span class="cx"> - (UIView *)assistantView
</span><span class="cx"> {
</span><span class="cx"> return [_control controlView];
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacLegacySessionStateCodingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -1122,22 +1122,23 @@
</span><span class="cx"> if (versionNumber != sessionStateDataVersion)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- auto sessionStateDictionary = adoptCF(dynamic_cf_cast<CFDictionaryRef>(CFPropertyListCreateWithData(kCFAllocatorDefault, adoptCF(CFDataCreate(kCFAllocatorDefault, bytes + sizeof(uint32_t), size - sizeof(uint32_t))).get(), kCFPropertyListImmutable, nullptr, nullptr)));
</del><ins>+ auto cfPropertyList = adoptCF(CFPropertyListCreateWithData(kCFAllocatorDefault, adoptCF(CFDataCreate(kCFAllocatorDefault, bytes + sizeof(uint32_t), size - sizeof(uint32_t))).get(), kCFPropertyListImmutable, nullptr, nullptr));
+ auto sessionStateDictionary = dynamic_cf_cast<CFDictionaryRef>(cfPropertyList.get());
</ins><span class="cx"> if (!sessionStateDictionary)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- if (auto backForwardListDictionary = dynamic_cf_cast<CFDictionaryRef>(CFDictionaryGetValue(sessionStateDictionary.get(), sessionHistoryKey))) {
</del><ins>+ if (auto backForwardListDictionary = dynamic_cf_cast<CFDictionaryRef>(CFDictionaryGetValue(sessionStateDictionary, sessionHistoryKey))) {
</ins><span class="cx"> if (!decodeSessionHistory(backForwardListDictionary, sessionState.backForwardListState))
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (auto provisionalURLString = dynamic_cf_cast<CFStringRef>(CFDictionaryGetValue(sessionStateDictionary.get(), provisionalURLKey))) {
</del><ins>+ if (auto provisionalURLString = dynamic_cf_cast<CFStringRef>(CFDictionaryGetValue(sessionStateDictionary, provisionalURLKey))) {
</ins><span class="cx"> sessionState.provisionalURL = WebCore::URL(WebCore::URL(), provisionalURLString);
</span><span class="cx"> if (!sessionState.provisionalURL.isValid())
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (auto renderTreeSize = dynamic_cf_cast<CFNumberRef>(CFDictionaryGetValue(sessionStateDictionary.get(), renderTreeSizeKey)))
</del><ins>+ if (auto renderTreeSize = dynamic_cf_cast<CFNumberRef>(CFDictionaryGetValue(sessionStateDictionary, renderTreeSizeKey)))
</ins><span class="cx"> CFNumberGetValue(renderTreeSize, kCFNumberSInt64Type, &sessionState.renderTreeSize);
</span><span class="cx"> else
</span><span class="cx"> sessionState.renderTreeSize = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacServicesControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/ServicesController.mm (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/ServicesController.mm        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebKit2/UIProcess/mac/ServicesController.mm        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -87,10 +87,10 @@
</span><span class="cx">
</span><span class="cx"> static NSAttributedString *attributedStringWithRichContent;
</span><span class="cx"> if (!attributedStringWithRichContent) {
</span><del>- NSTextAttachment *attachment = [[NSTextAttachment alloc] init];
- NSTextAttachmentCell *cell = [[NSTextAttachmentCell alloc] initImageCell:image.get()];
- [attachment setAttachmentCell:cell];
- NSMutableAttributedString *richString = (NSMutableAttributedString *)[NSMutableAttributedString attributedStringWithAttachment:attachment];
</del><ins>+ auto attachment = adoptNS([[NSTextAttachment alloc] init]);
+ auto cell = adoptNS([[NSTextAttachmentCell alloc] initImageCell:image.get()]);
+ [attachment setAttachmentCell:cell.get()];
+ NSMutableAttributedString *richString = (NSMutableAttributedString *)[NSMutableAttributedString attributedStringWithAttachment:attachment.get()];
</ins><span class="cx"> [richString appendAttributedString: attributedString];
</span><span class="cx"> attributedStringWithRichContent = [richString retain];
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebContextMenuProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm (199959 => 199960)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm        2016-04-24 02:27:34 UTC (rev 199959)
+++ trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm        2016-04-24 02:49:49 UTC (rev 199960)
</span><span class="lines">@@ -231,9 +231,9 @@
</span><span class="cx"> else
</span><span class="cx"> m_menu = adoptNS([[NSMenu alloc] init]);
</span><span class="cx"> int itemPosition = 0;
</span><del>- NSMenuItem *groupEntry = [[NSMenuItem alloc] initWithTitle:menuItemTitleForTelephoneNumberGroup() action:nil keyEquivalent:@""];
</del><ins>+ auto groupEntry = adoptNS([[NSMenuItem alloc] initWithTitle:menuItemTitleForTelephoneNumberGroup() action:nil keyEquivalent:@""]);
</ins><span class="cx"> [groupEntry setEnabled:NO];
</span><del>- [m_menu insertItem:groupEntry atIndex:itemPosition++];
</del><ins>+ [m_menu insertItem:groupEntry.get() atIndex:itemPosition++];
</ins><span class="cx"> for (auto& menuItem : telephoneNumberMenuItems)
</span><span class="cx"> [m_menu insertItem:menuItem.get() atIndex:itemPosition++];
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>