Return Ref instead of PassRefPtr in create() factory functions of WebCore/dom
authorgyuyoung.kim@webkit.org <gyuyoung.kim@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 May 2015 00:30:29 +0000 (00:30 +0000)
committergyuyoung.kim@webkit.org <gyuyoung.kim@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 May 2015 00:30:29 +0000 (00:30 +0000)
commit24a93b8e20807db9191f0bb17e5d1e3be4ffc3e0
tree39f099c97c09e63b57596527784b9bdfebe1da71
parent763cc4ad6262e974bac31a733edf79a2bb41689e
Return Ref instead of PassRefPtr in create() factory functions of WebCore/dom
https://bugs.webkit.org/show_bug.cgi?id=144904

Reviewed by Andreas Kling.

We return Ref when we're sure if pointer can't be null. If not, we use RefPtr instead PassRefPtr.

No new tests, no behavior changes.

* dom/AutocompleteErrorEvent.h:
* dom/DOMNamedFlowCollection.h:
(WebCore::DOMNamedFlowCollection::create):
* dom/MessageChannel.h:
(WebCore::MessageChannel::create):
* dom/MessagePort.h:
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::create):
* dom/MutationObserver.h:
* dom/NamedFlowCollection.h:
* dom/NodeFilter.h:
(WebCore::NodeFilter::create):
* dom/NodeIterator.h:
(WebCore::NodeIterator::create):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::create):
* dom/ProcessingInstruction.h:
* dom/ScriptedAnimationController.h:
(WebCore::ScriptedAnimationController::create):
* dom/SecurityPolicyViolationEvent.h:
* dom/StaticNodeList.h:
* dom/TemplateContentDocumentFragment.h:
* dom/Touch.cpp:
(WebCore::Touch::cloneWithNewTarget):
* dom/Touch.h:
(WebCore::Touch::create):
* dom/TouchEvent.h:
* dom/TouchList.h:
(WebCore::TouchList::create):
* dom/TreeWalker.h:
(WebCore::TreeWalker::create):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::create):
* dom/WebKitNamedFlow.h:
* dom/default/PlatformMessagePortChannel.cpp:
(WebCore::PlatformMessagePortChannel::create):
* dom/default/PlatformMessagePortChannel.h:
(WebCore::PlatformMessagePortChannel::MessagePortQueue::create):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
25 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/AutocompleteErrorEvent.h
Source/WebCore/dom/DOMNamedFlowCollection.h
Source/WebCore/dom/MessageChannel.h
Source/WebCore/dom/MessagePort.h
Source/WebCore/dom/MutationObserver.cpp
Source/WebCore/dom/MutationObserver.h
Source/WebCore/dom/NamedFlowCollection.h
Source/WebCore/dom/NodeFilter.h
Source/WebCore/dom/NodeIterator.h
Source/WebCore/dom/ProcessingInstruction.cpp
Source/WebCore/dom/ProcessingInstruction.h
Source/WebCore/dom/ScriptedAnimationController.h
Source/WebCore/dom/SecurityPolicyViolationEvent.h
Source/WebCore/dom/StaticNodeList.h
Source/WebCore/dom/TemplateContentDocumentFragment.h
Source/WebCore/dom/Touch.cpp
Source/WebCore/dom/Touch.h
Source/WebCore/dom/TouchEvent.h
Source/WebCore/dom/TouchList.h
Source/WebCore/dom/TreeWalker.h
Source/WebCore/dom/WebKitNamedFlow.cpp
Source/WebCore/dom/WebKitNamedFlow.h
Source/WebCore/dom/default/PlatformMessagePortChannel.cpp
Source/WebCore/dom/default/PlatformMessagePortChannel.h