Remove all uses of PassRefPtr in WTF
authorkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Jun 2016 01:31:17 +0000 (01:31 +0000)
committerkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Jun 2016 01:31:17 +0000 (01:31 +0000)
commit4a40170c0850c97730ba5df6a2b9f694cce83ac8
treee1e477164f521c7c6e5fa56967ca02e98cff895e
parent908572ada2e4d6a87c04f7eaef565a610501707e
Remove all uses of PassRefPtr in WTF
https://bugs.webkit.org/show_bug.cgi?id=157596
<rdar://problem/26234391>

Reviewed by Chris Dumez.

Source/JavaScriptCore:

Update calls to interfaces that no longer take or return PassRefPtrs.

* runtime/JSString.cpp:
(JSC::JSRopeString::resolveRope):
* runtime/JSString.h:
(JSC::JSString::JSString):
(JSC::jsSubstring):
* runtime/PrivateName.h:
(JSC::PrivateName::PrivateName):
* runtime/SmallStrings.cpp:
(JSC::SmallStringsStorage::SmallStringsStorage):
* runtime/StringConstructor.cpp:
(JSC::stringFromCharCodeSlowCase):
* runtime/StringPrototype.cpp:
(JSC::jsSpliceSubstrings):
(JSC::jsSpliceSubstringsWithSeparators):
(JSC::replaceUsingStringSearch):
(JSC::repeatCharacter):
(JSC::stringProtoFuncFontsize):
(JSC::stringProtoFuncLink):
(JSC::normalize):

Source/WebCore:

Update calls to interfaces that no longer take or return PassRefPtrs.

No new tests: no new functionality so changes are covered by existing
tests.

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::formatNumberValue):
* dom/Document.cpp:
(WebCore::Document::displayStringModifiedByEncoding):
* xml/XPathGrammar.y:

Source/WTF:

Remove/update most interfaces that take or return PassRefPtrs.
Remaining references include those in non-Cocoa implementations and
those required for continued compatibility with modules that still use
PassRefPtrs (specifically: Forward.h, RefPtr interoperability,
SizeLimits.h, WorkQueue (Windows) DispatchQueueEfl,
DispatchWorkItemEfl, and PassRefPtr itself).

Update calls to interfaces that no longer take or return PassRefPtrs.

Update adoptRef(T*) to return a RefPtr instead of a PassRefPtr and
move it to RefPtr.h from PassRefPtr.h.

* wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::allocate):
* wtf/MetaAllocator.h:
* wtf/ParallelJobsGeneric.h:
(WTF::ParallelEnvironment::ThreadPrivate::create):
* wtf/text/AtomicStringImpl.cpp:
(WTF::HashAndUTF8CharactersTranslator::translate):
(WTF::SubstringTranslator::translate):
* wtf/text/CString.cpp:
(WTF::CStringBuffer::createUninitialized):
* wtf/text/CString.h:
* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::reifyString):
(WTF::StringBuilder::resize):
(WTF::StringBuilder::reallocateBuffer<LChar>):
(WTF::StringBuilder::reallocateBuffer<UChar>):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::reallocateInternal):
(WTF::StringImpl::reallocate):
(WTF::StringImpl::create8BitIfPossible):
(WTF::StringImpl::createSymbol):
(WTF::StringImpl::createNullSymbol):
(WTF::StringImpl::convertToLowercaseWithoutLocale):
(WTF::StringImpl::convertToUppercaseWithoutLocale):
(WTF::StringImpl::convertToLowercaseWithLocale):
(WTF::StringImpl::convertToUppercaseWithLocale):
(WTF::StringImpl::convertASCIICase):
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::createSubstringSharingImpl):
(WTF::StringImpl::tryCreateUninitialized):
(WTF::StringImpl::extractFoldedStringInSymbol):
* wtf/text/SymbolRegistry.cpp:
(WTF::SymbolRegistry::symbolForKey):
* wtf/text/WTFString.cpp:
(WTF::String::substringSharingImpl):
* wtf/text/WTFString.h:
(WTF::String::String): Deleted.
* wtf/text/cf/StringImplCF.cpp:

Tools:

Update calls to interfaces that no longer take or return PassRefPtrs.

* TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::stringFromUTF8):
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
34 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jit/GCAwareJITStubRoutine.cpp
Source/JavaScriptCore/runtime/JSString.cpp
Source/JavaScriptCore/runtime/JSString.h
Source/JavaScriptCore/runtime/PrivateName.h
Source/JavaScriptCore/runtime/SmallStrings.cpp
Source/JavaScriptCore/runtime/StringConstructor.cpp
Source/JavaScriptCore/runtime/StringPrototype.cpp
Source/WTF/ChangeLog
Source/WTF/wtf/MetaAllocator.cpp
Source/WTF/wtf/MetaAllocator.h
Source/WTF/wtf/ParallelJobsGeneric.h
Source/WTF/wtf/PassRefPtr.h
Source/WTF/wtf/RefPtr.h
Source/WTF/wtf/text/AtomicStringImpl.cpp
Source/WTF/wtf/text/CString.cpp
Source/WTF/wtf/text/CString.h
Source/WTF/wtf/text/StringBuilder.cpp
Source/WTF/wtf/text/StringImpl.cpp
Source/WTF/wtf/text/StringImpl.h
Source/WTF/wtf/text/SymbolRegistry.cpp
Source/WTF/wtf/text/WTFString.cpp
Source/WTF/wtf/text/WTFString.h
Source/WTF/wtf/text/cf/StringImplCF.cpp
Source/WebCore/ChangeLog
Source/WebCore/css/CSSPrimitiveValue.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.cpp
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Source/WebCore/platform/animation/TimingFunction.h
Source/WebKit2/Platform/IPC/HandleMessage.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp