Changeset 154963 in webkit for trunk/Source/JavaScriptCore/API


Ignore:
Timestamp:
Sep 2, 2013, 11:55:05 AM (12 years ago)
Author:
Darin Adler
Message:

[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:

  • API/JSValue.mm:

(valueToString): Use CFBridgingRelease.

Source/WebCore:

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(AXTextMarkerRange):
(AXTextMarkerRangeStart):
(AXTextMarkerRangeEnd):
(textMarkerForVisiblePosition):
Use CFBridgingRelease.

  • platform/mac/KURLMac.mm:

(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].

  • Misc/WebNSURLExtras.mm:

(-[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/WebView.mm:

(+[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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSValue.mm

    r154647 r154963  
    747747    }
    748748
    749     NSString *stringNS = HardAutorelease(JSStringCopyCFString(kCFAllocatorDefault, jsstring));
     749    NSString *stringNS = CFBridgingRelease(JSStringCopyCFString(kCFAllocatorDefault, jsstring));
    750750    JSStringRelease(jsstring);
    751751    return stringNS;
Note: See TracChangeset for help on using the changeset viewer.