WebKit Bugzilla
Attachment 342720 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-20180613194738.patch (text/plain), 21.23 KB, created by
Darin Adler
on 2018-06-13 19:47:39 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Darin Adler
Created:
2018-06-13 19:47:39 PDT
Size:
21.23 KB
patch
obsolete
>Subversion Revision: 232824 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 4f1c316a790e00ba184d9ef660215fd6494d4e04..7c7408ed9663b482d93b49c2d9d364f8dad7385a 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,22 @@ >+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: Improved the definition of autorelease so it does >+ the right thing for both Objective-C types and non-Objective-C type. >+ Also added bridgingAutorelease for when we want to autorelease as >+ part of converting from a CF type to an Objective-C type. The two >+ advantages of bridgingAutorelease are that it does not require an >+ additional explicit __bridge cast and that it does not prevent the >+ ARC objc_autoreleaseReturnValue optimization the way that doing an >+ autorelease on the CF type would. >+ >+ * wtf/text/mac/StringImplMac.mm: >+ (WTF::StringImpl::operator NSString *): Use bridgingAutorelease. >+ > 2018-06-13 Keith Miller <keith_miller@apple.com> > > AutomaticThread should have a way to provide a thread name >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8b4845d87b759cf25fc4dbc9cce17f06c1cdcc8f..7e20966d2dd246b4042ab0eb8c6b97bebe4af79e 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-13 Chris Dumez <cdumez@apple.com> > > Crash under SWServer::unregisterConnection(Connection&) >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index feb1d22f40f5e0d73157ef5de842c0943e9df70c..94d5d04ebcad876410aed006edc1eaffb1d9ea93 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-13 Chris Dumez <cdumez@apple.com> > > Crash under SWServer::unregisterConnection(Connection&) >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 7dc50fd18b91bcbaa9746aa083203c68e43a6202..f4132ede860238807841d1e7b3e214eb533a2159 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,31 @@ >+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!). >+ >+ * 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. >+ >+ * WebView/WebPDFRepresentation.mm: >+ (-[WebPDFRepresentation convertPostScriptDataSourceToPDF:]): Use bridgingAutorelease. >+ > 2018-06-13 Youenn Fablet <youenn@apple.com> > > Supported plugin check should be based on plugin identifier >diff --git a/Source/WTF/wtf/RetainPtr.h b/Source/WTF/wtf/RetainPtr.h >index 545ec398ac0ad28e152a3f917ce21a3913022d2f..c1a496d4d7c62ad1ca4b669245d60f85a0214bdd 100644 >--- a/Source/WTF/wtf/RetainPtr.h >+++ b/Source/WTF/wtf/RetainPtr.h >@@ -84,6 +84,9 @@ public: > void clear(); > PtrType leakRef() WARN_UNUSED_RETURN; > PtrType autorelease(); >+#ifdef __OBJC__ >+ id bridgingAutorelease(); >+#endif > > PtrType get() const { return fromStorageType(m_ptr); } > PtrType operator->() const { return fromStorageType(m_ptr); } >@@ -115,7 +118,7 @@ private: > > static PtrType hashTableDeletedValue() { return reinterpret_cast<PtrType>(-1); } > >-#if defined (__OBJC__) && __has_feature(objc_arc) >+#ifdef __OBJC__ > template<typename U> > typename std::enable_if<std::is_convertible<U, id>::value, PtrType>::type > fromStorageTypeHelper(StorageType ptr) const >@@ -141,18 +144,23 @@ private: > StorageType toStorageType(PtrType ptr) const { return (StorageType)ptr; } > #endif > >+#ifdef __OBJC__ >+ template<typename U> typename std::enable_if<std::is_convertible<U, id>::value, PtrType>::type autoreleaseHelper(); >+ template<typename U> typename std::enable_if<!std::is_convertible<U, id>::value, PtrType>::type autoreleaseHelper(); >+#endif >+ > 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 +174,46 @@ 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)); > } > >-#ifdef __OBJC__ >+#ifndef __OBJC__ >+ >+template<typename T> inline auto RetainPtr<T>::autorelease() -> PtrType >+{ >+ if (m_ptr) >+ CFAutorelease(m_ptr); >+ return leakRef(); >+} >+ >+#else >+ >+template<typename T> template<typename U> inline auto RetainPtr<T>::autoreleaseHelper() -> typename std::enable_if<std::is_convertible<U, id>::value, PtrType>::type >+{ >+ return CFBridgingRelease(std::exchange(m_ptr, nullptr)); >+} >+ >+template<typename T> template<typename U> inline auto RetainPtr<T>::autoreleaseHelper() -> typename std::enable_if<!std::is_convertible<U, id>::value, PtrType>::type >+{ >+ if (m_ptr) >+ CFAutorelease(m_ptr); >+ return leakRef(); >+} >+ > template<typename T> inline auto RetainPtr<T>::autorelease() -> PtrType > { >- return (__bridge PtrType)CFBridgingRelease(leakRef()); >+ return autoreleaseHelper<PtrType>(); > } >+ >+// 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/graphics/mac/ComplexTextControllerCoreText.mm b/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm >index e8901bc13ada405232d0d3ff4451963d7d7565b2..f485518ea70e8fe0123512d1004f273b95d2e09c 100644 >--- a/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm >+++ b/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm >@@ -144,7 +144,7 @@ void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp, > if (!m_mayUseNaturalWritingDirection || m_run.directionalOverride()) { > const short ltrForcedEmbeddingLevelValue = 0; > const short rtlForcedEmbeddingLevelValue = 1; >-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED == 101400) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED == 120000) >+#if 0 && (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED == 101400) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED == 120000) > static const void* optionKeys[] = { kCTTypesetterOptionForcedEmbeddingLevel, kCTTypesetterOptionAllowUnboundedLayout }; > static const void* ltrOptionValues[] = { CFNumberCreate(kCFAllocatorDefault, kCFNumberShortType, <rForcedEmbeddingLevelValue), kCFBooleanTrue }; > static const void* rtlOptionValues[] = { CFNumberCreate(kCFAllocatorDefault, kCFNumberShortType, &rtlForcedEmbeddingLevelValue), kCFBooleanTrue }; >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/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..d009fc258e252fb9b282112b4be816c24a0c3fa7 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 >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 2708476459870b3f61b250ccf4d0b2cf87e1bc2e..bc5dfbb0851ef0e0a1bab1a480241f9ca11a307a 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-11 Carlos Alberto Lopez Perez <clopez@igalia.com> > > [GTK] Add a script to upload the data generated with run-benchmark to a browserperfdash server and use it on the gtk perf bot >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
Flags:
andersca
:
review+
darin
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186526
:
342440
|
342548
|
342550
|
342579
|
342632
| 342720