[Mac] No need for HardAutorelease, which is same as CFBridgingRelease
https://bugs.webkit.org/show_bug.cgi?id=120569
Reviewed by Andy Estes.
Source/JavaScriptCore:
(valueToString): Use CFBridgingRelease.
Source/WebCore:
- accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXTextMarkerRange):
(AXTextMarkerRangeStart):
(AXTextMarkerRangeEnd):
(textMarkerForVisiblePosition):
Use CFBridgingRelease.
(WebCore::KURL::operator NSURL *): Use CFBridgingRelease.
(WebCore::KURL::createCFURL): Get rid of needless local variable.
- platform/mac/WebCoreNSURLExtras.mm:
(WebCore::mapHostNameWithRange):
(WebCore::URLWithData):
(WebCore::userVisibleString):
- platform/text/mac/StringImplMac.mm:
(WTF::StringImpl::operator NSString *):
Use CFBridgingRelease.
Source/WebKit/mac:
- Misc/WebNSFileManagerExtras.mm:
(-[NSFileManager _webkit_startupVolumeName]): Removed some unneeded locals.
Got rid of the pointless ref/leakRef/HardAutorelease dance, and replaced it
with a [[x copy] autorelease].
(-[NSURL _web_URLWithLowercasedScheme]): Use CFBridgingRelease, and got rid
of unneeded type casts.
- Plugins/WebBasePluginPackage.mm:
(+[WebBasePluginPackage preferredLocalizationName]): Use CFBridgingRelease.
- WebView/WebPDFRepresentation.mm:
(-[WebPDFRepresentation convertPostScriptDataSourceToPDF:]): Ditto.
(+[WebView _setCacheModel:]): Use CFBridgingRelease and got rid of unneeded
type cast.
Source/WebKit2:
- Platform/mac/StringUtilities.mm:
(WebKit::nsStringFromWebCoreString): Use CFBridgingRelease. Also
changed condition to be a little cleaner and use a constant string for empty
strings as well as null strings.
- UIProcess/API/mac/WKBrowsingContextController.mm:
(autoreleased): Switched from autorelease to CFBridgingRelease for strings,
which eliminates a type cast and makes this work under GC, although I don't
think we should compile WebKit2 for GC.
- WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
Use CFBridgingRelease.
Source/WTF:
- wtf/ObjcRuntimeExtras.h: Added a FIXME about miscapitalization of ObjC.
Deleted HardAutorelease.
(wtfObjcMsgSend): Dropped the use of abbreviations in local class and argument names.
(wtfCallIMP): Ditto.
Tools:
- DumpRenderTree/mac/DumpRenderTree.mm:
(dump): Use CFBridgingRelease.