WebKit Bugzilla
Attachment 342632 Details for
Bug 186526
: [Cocoa] Make some RetainPtr refinements to get more ready for ARC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186526-20180612222733.patch (text/plain), 20.66 KB, created by
Darin Adler
on 2018-06-12 22:27:34 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Darin Adler
Created:
2018-06-12 22:27:34 PDT
Size:
20.66 KB
patch
obsolete
>Subversion Revision: 232787 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index c2c83cfbe4108647f6a4147c6c78e57d3c82fad0..e29237228838990b2ef784060bd53a2fe5043289 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,20 @@ >+2018-06-12 Darin Adler <darin@apple.com> >+ >+ [Cocoa] Make some RetainPtr refinements to get more ready for ARC >+ https://bugs.webkit.org/show_bug.cgi?id=186526 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/RetainPtr.h: Added autoreleaseCF and bridgingAutorelease. >+ The existing autorelease is for autorelease of an Objective-C type. >+ The two new ones are for autorelease of CF types: We can use >+ autoreleaseCF when we want an autoreleased CF type, and we can >+ use bridgingAutorelease when we want to autorelease as part of >+ converting from a CF type to an Objective-C type. >+ >+ * wtf/text/mac/StringImplMac.mm: >+ (WTF::StringImpl::operator NSString *): Use bridgingAutorelease. >+ > 2018-06-11 Saam Barati <sbarati@apple.com> > > The NaturalLoops algorithm only works when the list of blocks in a loop is de-duplicated >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index dfce55de473a34a9628ba3910b93db9eca770a64..904b2782e5be1963908af0efad466ce411ddf33a 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,16 @@ >+2018-06-12 Darin Adler <darin@apple.com> >+ >+ [Cocoa] Make some RetainPtr refinements to get more ready for ARC >+ https://bugs.webkit.org/show_bug.cgi?id=186526 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/ios/UserAgentIOS.mm: >+ (WebCore::deviceNameForUserAgent): Drop unnecessary use of RetainPtr. >+ >+ * platform/mac/URLMac.mm: >+ (WebCore::URL::operator NSURL * const): Use bridgingAutorelease. >+ > 2018-06-12 Zalan Bujtas <zalan@apple.com> > > Complex text handling should opt out of bounded text layout. >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index a777d75e06dafa3f7df0f9b2911b6d753dae328f..22b655b7e0cf131c93c3ed04b432f364180f1531 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,27 @@ >+2018-06-12 Darin Adler <darin@apple.com> >+ >+ [Cocoa] Make some RetainPtr refinements to get more ready for ARC >+ https://bugs.webkit.org/show_bug.cgi?id=186526 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Platform/cf/ModuleCF.cpp: >+ (WebKit::Module::load): Use move assignment instead of adoptCF/leakRef. >+ >+ * Shared/Cocoa/WKNSURLExtras.mm: >+ (+[NSURL _web_URLWithWTFString:]): Cast to NSURL * instead of doing the autorelease >+ here, since the NSURL * operator already does what we want. >+ (+[NSURL _web_URLWithWTFString:relativeToURL:]): Ditto. >+ >+ * UIProcess/ios/WKContentView.mm: >+ (-[WKContentView _wk_printedDocument]): Get rid of incorrect use of >+ RetainPtr::autorelease. We don't want to null out _printedDocument each time this >+ function is called. >+ >+ * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm: >+ (collectIcons): Get rid of unnecessary use of RetainPtr::autorelease in a function >+ that returns a RetainPtr. >+ > 2018-06-12 Brent Fulgham <bfulgham@apple.com> > > Turn CSS Spring Animations and Link Preload off by default for production builds. >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 9ca66687eba9b173c9910e7adfe3074f4a80b82f..ea75cca5b4207d3b6ba85c89450aeeba179bdc14 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,36 @@ >+2018-06-12 Darin Adler <darin@apple.com> >+ >+ [Cocoa] Make some RetainPtr refinements to get more ready for ARC >+ https://bugs.webkit.org/show_bug.cgi?id=186526 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * DOM/DOM.mm: >+ (-[DOMNode getPreviewSnapshotImage:andRects:]): Use autoreleaseCF. >+ (-[DOMRange renderedImageForcingBlackText:]): Ditto. >+ >+ * Plugins/Hosted/NetscapePluginHostManager.mm: >+ (WebKit::preferredBundleLocalizationName): Use bridgingAutorelease. >+ >+ * Plugins/Hosted/WebHostedNetscapePluginView.mm: >+ (-[WebHostedNetscapePluginView createPluginLayer]): Use move >+ assignment rather than adoptNS/leakRef. >+ * Plugins/WebNetscapePluginView.mm: >+ (-[WebNetscapePluginView createPlugin]): Ditto. >+ >+ * WebCoreSupport/WebContextMenuClient.mm: >+ (WebContextMenuClient::contextMenuForEvent): Get rid of unnecessary use of >+ RetainPtr::autorelease; no need to autorelease just to pass something as a function >+ argument, so use RetainPtr::get instead. >+ >+ * WebView/WebHTMLView.mm: >+ (customMenuFromDefaultItems): Get rid of of unnecessary use of RetainPtr::autorelease. >+ No need to autorelease the result when the return type is RetainPtr. >+ (imageFromRect): Use autoreleaseCF. >+ >+ * WebView/WebPDFRepresentation.mm: >+ (-[WebPDFRepresentation convertPostScriptDataSourceToPDF:]): Use bridgingAutorelease. >+ > 2018-06-11 Tim Horton <timothy_horton@apple.com> > > Link drag image is inconsistently unreadable in dark mode >diff --git a/Source/WTF/wtf/RetainPtr.h b/Source/WTF/wtf/RetainPtr.h >index 545ec398ac0ad28e152a3f917ce21a3913022d2f..fc6ed7404c2d80ca32f6ab2af113cf22cebe12b7 100644 >--- a/Source/WTF/wtf/RetainPtr.h >+++ b/Source/WTF/wtf/RetainPtr.h >@@ -83,7 +83,11 @@ public: > > void clear(); > PtrType leakRef() WARN_UNUSED_RETURN; >+ PtrType autoreleaseCF(); >+#ifdef __OBJC__ > PtrType autorelease(); >+ id bridgingAutorelease(); >+#endif > > PtrType get() const { return fromStorageType(m_ptr); } > PtrType operator->() const { return fromStorageType(m_ptr); } >@@ -115,7 +119,7 @@ private: > > static PtrType hashTableDeletedValue() { return reinterpret_cast<PtrType>(-1); } > >-#if defined (__OBJC__) && __has_feature(objc_arc) >+#if defined(__OBJC__) && __has_feature(objc_arc) > template<typename U> > typename std::enable_if<std::is_convertible<U, id>::value, PtrType>::type > fromStorageTypeHelper(StorageType ptr) const >@@ -144,15 +148,15 @@ private: > StorageType m_ptr; > }; > >+// Helper function for creating a RetainPtr using template argument deduction. >+template<typename T> RetainPtr<T> retainPtr(T) WARN_UNUSED_RETURN; >+ > template<typename T> inline RetainPtr<T>::~RetainPtr() > { > if (StorageType ptr = std::exchange(m_ptr, nullptr)) > CFRelease(ptr); > } > >-// Helper function for creating a RetainPtr using template argument deduction. >-template<typename T> inline RetainPtr<T> retainPtr(T) WARN_UNUSED_RETURN; >- > template<typename T> template<typename U> inline RetainPtr<T>::RetainPtr(const RetainPtr<U>& o) > : m_ptr(toStorageType(o.get())) > { >@@ -166,16 +170,36 @@ template<typename T> inline void RetainPtr<T>::clear() > CFRelease(ptr); > } > >-template<typename T> inline typename RetainPtr<T>::PtrType RetainPtr<T>::leakRef() >+template<typename T> inline auto RetainPtr<T>::leakRef() -> PtrType > { > return fromStorageType(std::exchange(m_ptr, nullptr)); > } > >+template<typename T> inline auto RetainPtr<T>::autoreleaseCF() -> PtrType >+{ >+#ifdef __OBJC__ >+ static_assert((!std::is_convertible<PtrType, id>::value), "Don't use autoreleaseCF for Objective-C pointer types."); >+#endif >+ if (m_ptr) >+ CFAutorelease(m_ptr); >+ return leakRef(); >+} >+ > #ifdef __OBJC__ >+ > template<typename T> inline auto RetainPtr<T>::autorelease() -> PtrType > { >- return (__bridge PtrType)CFBridgingRelease(leakRef()); >+ static_assert((std::is_convertible<PtrType, id>::value), "Don't use autorelease for non-Objective-C pointer types."); >+ return CFBridgingRelease(std::exchange(m_ptr, nullptr)); > } >+ >+// FIXME: It would be nice if we could base the return type on the type that is toll-free bridged with T rather than using id. >+template<typename T> inline id RetainPtr<T>::bridgingAutorelease() >+{ >+ static_assert((!std::is_convertible<PtrType, id>::value), "Don't use bridgingAutorelease for Objective-C pointer types."); >+ return CFBridgingRelease(leakRef()); >+} >+ > #endif > > template<typename T> inline RetainPtr<T>& RetainPtr<T>::operator=(const RetainPtr& o) >diff --git a/Source/WTF/wtf/text/mac/StringImplMac.mm b/Source/WTF/wtf/text/mac/StringImplMac.mm >index a00ec0d120ba102e374fe1e23bba74ad4b8a0a61..7e1e4ff418720d17600bc6b74575ac0dad81051e 100644 >--- a/Source/WTF/wtf/text/mac/StringImplMac.mm >+++ b/Source/WTF/wtf/text/mac/StringImplMac.mm >@@ -28,7 +28,7 @@ namespace WTF { > > StringImpl::operator NSString *() > { >- return (NSString *)createCFString().autorelease(); >+ return createCFString().bridgingAutorelease(); > } > > } >diff --git a/Source/WebCore/platform/ios/UserAgentIOS.mm b/Source/WebCore/platform/ios/UserAgentIOS.mm >index b2b897e8e0ad95220272d1da1760b1c3b7f69151..e5606f08b187bca9b89e8695458e4ce22f2d6109 100644 >--- a/Source/WebCore/platform/ios/UserAgentIOS.mm >+++ b/Source/WebCore/platform/ios/UserAgentIOS.mm >@@ -70,13 +70,13 @@ static inline NSString *deviceNameForUserAgent() > return @"iPhone"; > } > >- auto name = retainPtr((NSString *)deviceName()); >+ NSString *name = deviceName(); > #if PLATFORM(IOS_SIMULATOR) > NSUInteger location = [name rangeOfString:@" Simulator" options:NSBackwardsSearch].location; > if (location != NSNotFound && location > 0) > return [name substringToIndex:location]; > #endif >- return name.autorelease(); >+ return name; > } > > String standardUserAgentWithApplicationName(const String& applicationName) >diff --git a/Source/WebCore/platform/mac/URLMac.mm b/Source/WebCore/platform/mac/URLMac.mm >index bbbf9a2f7869a02f80f65280d2f11f057e7af9a6..025c1de7b0283cd0dbdba56ca16fafc5f39c58b6 100644 >--- a/Source/WebCore/platform/mac/URLMac.mm >+++ b/Source/WebCore/platform/mac/URLMac.mm >@@ -56,7 +56,7 @@ URL::operator NSURL *() const > { > // Creating a toll-free bridged CFURL because creation with NSURL methods would not preserve the original string. > // We'll need fidelity when round-tripping via CFURLGetBytes(). >- return (NSURL *)createCFURL().autorelease(); >+ return createCFURL().bridgingAutorelease(); > } > > RetainPtr<CFURLRef> URL::createCFURL() const >diff --git a/Source/WebKit/Platform/cf/ModuleCF.cpp b/Source/WebKit/Platform/cf/ModuleCF.cpp >index 78dbfb74bd15c961b1223a0325a8e5b012647668..058bcfd43c49ecdbf455f168afee5e64084f1a7c 100644 >--- a/Source/WebKit/Platform/cf/ModuleCF.cpp >+++ b/Source/WebKit/Platform/cf/ModuleCF.cpp >@@ -41,7 +41,7 @@ bool Module::load() > if (!CFBundleLoadExecutable(bundle.get())) > return false; > >- m_bundle = adoptCF(bundle.leakRef()); >+ m_bundle = WTFMove(bundle); > return true; > } > >diff --git a/Source/WebKit/Shared/Cocoa/WKNSURLExtras.mm b/Source/WebKit/Shared/Cocoa/WKNSURLExtras.mm >index 1a8363e8f8848bd5df3e3425f1b1db7b237266bf..0188f747982a940a48ab86f8288aab006dfd11d7 100644 >--- a/Source/WebKit/Shared/Cocoa/WKNSURLExtras.mm >+++ b/Source/WebKit/Shared/Cocoa/WKNSURLExtras.mm >@@ -38,13 +38,13 @@ @implementation NSURL (WKExtras) > + (instancetype)_web_URLWithWTFString:(const String&)string > { > URL url { URL { }, string }; >- return (__bridge NSURL*) url.createCFURL().autorelease(); >+ return (NSURL *)url; > } > > + (instancetype)_web_URLWithWTFString:(const String&)string relativeToURL:(NSURL *)baseURL > { > URL url { URL { baseURL }, string }; >- return (__bridge NSURL*) url.createCFURL().autorelease(); >+ return (NSURL *)url; > } > > - (String)_web_originalDataAsWTFString >diff --git a/Source/WebKit/UIProcess/ios/WKContentView.mm b/Source/WebKit/UIProcess/ios/WKContentView.mm >index d0cbde1a9ad959655d2ed417a9f8f83d272b0dab..8a507ab295a8e2262d08c56da8d3b9d8c80a7f7c 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentView.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentView.mm >@@ -700,7 +700,7 @@ - (CGPDFDocumentRef)_wk_printedDocument > ASSERT(!_isPrintingToPDF); > } > >- return _printedDocument.autorelease(); >+ return _printedDocument.get(); > } > > @end >diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm b/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm >index 543f68ce1ccd0cf29ca205f1adf442eb78d192a1..9f483dbcbd5e5413e4e3f96ee23e0784cf5584fc 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm >+++ b/Source/WebKit/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm >@@ -124,7 +124,7 @@ static RetainPtr<NSArray> collectIcons(WebCore::Frame* frame, OptionSet<WebCore: > } > } > >- return result.autorelease(); >+ return WTFMove(result); > } > > - (NSArray *)appleTouchIconURLs >diff --git a/Source/WebKitLegacy/mac/DOM/DOM.mm b/Source/WebKitLegacy/mac/DOM/DOM.mm >index 83d56d0448655f76a8c76b9b93ceeefb8a7dd81a..78cfcb39479e3ddb45cc9a24ee81251df5c53459 100644 >--- a/Source/WebKitLegacy/mac/DOM/DOM.mm >+++ b/Source/WebKitLegacy/mac/DOM/DOM.mm >@@ -557,7 +557,7 @@ - (void)getPreviewSnapshotImage:(CGImageRef*)cgImage andRects:(NSArray **)rects > > if (textIndicator) { > if (Image* image = textIndicator->contentImage()) >- *cgImage = image->nativeImage().autorelease(); >+ *cgImage = image->nativeImage().autoreleaseCF(); > } > > RetainPtr<NSMutableArray> rectArray = adoptNS([[NSMutableArray alloc] init]); >@@ -629,7 +629,7 @@ - (CGImageRef)renderedImageForcingBlackText:(BOOL)forceBlackText > > return renderedImage.autorelease(); > #else >- return createDragImageForRange(*frame, range, forceBlackText).autorelease(); >+ return createDragImageForRange(*frame, range, forceBlackText).autoreleaseCF(); > #endif > } > >diff --git a/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostManager.mm b/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostManager.mm >index d328862a6c2204289aa9698bf20adc74584c8b67..703c5462c8ef22a37b1dd86048e3ba161ab5f5b2 100644 >--- a/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostManager.mm >+++ b/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostManager.mm >@@ -121,8 +121,7 @@ static NSString *preferredBundleLocalizationName() > if (!success) > return @"en_US"; > >- auto code = adoptCF(CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes(0, languageCode, regionCode)); >- return (NSString *)code.autorelease(); >+ return adoptCF(CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes(0, languageCode, regionCode)).bridgingAutorelease(); > } > > bool NetscapePluginHostManager::spawnPluginHost(const String& pluginPath, cpu_type_t pluginArchitecture, mach_port_t clientPort, mach_port_t& pluginHostPort, ProcessSerialNumber& pluginHostPSN) >diff --git a/Source/WebKitLegacy/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/Source/WebKitLegacy/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm >index 9f12122cc07a619ca45c4fb574ffedfe0e14849f..f3e04b4f558061191c86fd6775515914863d1194 100644 >--- a/Source/WebKitLegacy/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm >+++ b/Source/WebKitLegacy/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm >@@ -189,7 +189,7 @@ - (void)createPluginLayer > // FIXME: This code can be shared between WebHostedNetscapePluginView and WebNetscapePluginView. > // Since this layer isn't going to be inserted into a view, we need to create another layer and flip its geometry > // in order to get the coordinate system right. >- RetainPtr<CALayer> realPluginLayer = adoptNS(_pluginLayer.leakRef()); >+ RetainPtr<CALayer> realPluginLayer = WTFMove(_pluginLayer); > > _pluginLayer = adoptNS([[CALayer alloc] init]); > _pluginLayer.get().bounds = realPluginLayer.get().bounds; >diff --git a/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginView.mm b/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginView.mm >index 4b14b6dcbe8350982112c1c234fba70c2f7fa9cd..b2b11d34cff57ec00406acff7c0e258ffb0357c8 100644 >--- a/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginView.mm >+++ b/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginView.mm >@@ -1098,7 +1098,7 @@ - (BOOL)createPlugin > // FIXME: This code can be shared between WebHostedNetscapePluginView and WebNetscapePluginView. > // Since this layer isn't going to be inserted into a view, we need to create another layer and flip its geometry > // in order to get the coordinate system right. >- RetainPtr<CALayer> realPluginLayer = adoptNS(_pluginLayer.leakRef()); >+ RetainPtr<CALayer> realPluginLayer = WTFMove(_pluginLayer); > > _pluginLayer = adoptNS([[CALayer alloc] init]); > _pluginLayer.get().bounds = realPluginLayer.get().bounds; >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebContextMenuClient.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebContextMenuClient.mm >index 2e6079c30d64d8b3cd2a43e6e7d9e44f1d266146..0ec1223ca141074e31adbf8e6c3c93002f8c2706 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebContextMenuClient.mm >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebContextMenuClient.mm >@@ -242,7 +242,7 @@ NSMenu *WebContextMenuClient::contextMenuForEvent(NSEvent *event, NSView *view, > if (Image* image = page->contextMenuController().context().controlledImage()) { > ASSERT(page->contextMenuController().context().hitTestResult().innerNode()); > >- RetainPtr<NSItemProvider> itemProvider = adoptNS([[NSItemProvider alloc] initWithItem:image->snapshotNSImage().autorelease() typeIdentifier:@"public.image"]); >+ RetainPtr<NSItemProvider> itemProvider = adoptNS([[NSItemProvider alloc] initWithItem:image->snapshotNSImage().get() typeIdentifier:@"public.image"]); > > bool isContentEditable = page->contextMenuController().context().hitTestResult().innerNode()->isContentEditable(); > m_sharingServicePickerController = adoptNS([[WebSharingServicePickerController alloc] initWithItems:@[ itemProvider.get() ] includeEditorServices:isContentEditable client:this style:NSSharingServicePickerStyleRollover]); >diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm >index 9d270ec1e04bb33b5c928be01803132e40de31c1..6493093a3df71fdc0df91fcbaced55eb8e1af114 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm >@@ -3714,7 +3714,7 @@ static RetainPtr<NSArray> customMenuFromDefaultItems(WebView *webView, const Con > > NSArray *delegateSuppliedItems = CallUIDelegate(webView, selector, element.get(), defaultMenuItems.get()); > >- return fixMenusReceivedFromOldClients(delegateSuppliedItems, savedItems.get()).autorelease(); >+ return fixMenusReceivedFromOldClients(delegateSuppliedItems, savedItems.get()); > } > > - (NSMenu *)menuForEvent:(NSEvent *)event >@@ -7060,7 +7060,7 @@ static CGImageRef imageFromRect(Frame* frame, CGRect rect) > WKSetCurrentGraphicsContext(oldContext); > frame->view()->setPaintBehavior(oldPaintBehavior); > >- return resultImage.autorelease(); >+ return resultImage.autoreleaseCF(); > > END_BLOCK_OBJC_EXCEPTIONS; > >diff --git a/Source/WebKitLegacy/mac/WebView/WebPDFRepresentation.mm b/Source/WebKitLegacy/mac/WebView/WebPDFRepresentation.mm >index cbd6679baff28e62e9e30575ebc34d780ae67c14..79db38a6660bad06b8825bb53cb04d2df6f56408 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPDFRepresentation.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebPDFRepresentation.mm >@@ -106,7 +106,7 @@ - (NSData *)convertPostScriptDataSourceToPDF:(NSData *)data > // Error handled by detecting zero-length 'result' in caller > CGPSConverterConvert(converter.get(), provider.get(), consumer.get(), 0); > >- return (NSData *)result.autorelease(); >+ return result.bridgingAutorelease(); > } > > - (void)finishedLoadingWithDataSource:(WebDataSource *)dataSource >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 0af8f0c9ddb6c5e2ecab1ca7218d3898f321e112..a3e62f0e476d3547cc06096496c36f2a21a6b496 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,14 @@ >+2018-06-12 Darin Adler <darin@apple.com> >+ >+ [Cocoa] Make some RetainPtr refinements to get more ready for ARC >+ https://bugs.webkit.org/show_bug.cgi?id=186526 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * DumpRenderTree/mac/LayoutTestHelper.m: >+ (colorProfileURLForDisplay): Use CFBridgingRelease instead of using >+ CFAutorelease for a bridging use case. >+ > 2018-06-12 Thibault Saunier <tsaunier@igalia.com> > > webkitpy: Implement coredumpctl support on linux >diff --git a/Tools/DumpRenderTree/mac/LayoutTestHelper.m b/Tools/DumpRenderTree/mac/LayoutTestHelper.m >index 330f27ef0beb497a493872afa38c7aaaf7b36d4e..1b5750403fd0ae72ead2d52019e3d083bc89573a 100644 >--- a/Tools/DumpRenderTree/mac/LayoutTestHelper.m >+++ b/Tools/DumpRenderTree/mac/LayoutTestHelper.m >@@ -95,7 +95,7 @@ > return nil; > } > >- NSURL *url = (NSURL *)CFAutorelease(CFRetain(profileURL)); >+ NSURL *url = CFBridgingRelease(CFRetain(profileURL)); > CFRelease(deviceInfo); > return url; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186526
:
342440
|
342548
|
342550
|
342579
|
342632
|
342720