Purge PassRefPtr in WebCore/Modules - 2
authorgyuyoung.kim@webkit.org <gyuyoung.kim@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 May 2015 04:22:37 +0000 (04:22 +0000)
committergyuyoung.kim@webkit.org <gyuyoung.kim@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 May 2015 04:22:37 +0000 (04:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=145304

Reviewed by Darin Adler.

As a step to remove PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr.

No new tests, no behavior changes

* Modules/mediasource/SourceBufferList.h:
* Modules/mediastream/AllAudioCapabilities.h:
(WebCore::AllAudioCapabilities::create):
* Modules/mediastream/AllVideoCapabilities.h:
(WebCore::AllVideoCapabilities::create):
* Modules/mediastream/CapabilityRange.cpp:
(WebCore::CapabilityRange::create):
* Modules/mediastream/CapabilityRange.h:
* Modules/mediastream/MediaSourceStates.cpp:
(WebCore::MediaSourceStates::create):
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::create):
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::create):
* Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
(WebCore::MediaStreamTrackSourcesRequest::create):
* Modules/mediastream/MediaTrackConstraint.cpp:
(WebCore::MediaTrackConstraint::create):
* Modules/mediastream/MediaTrackConstraint.h:
* Modules/mediastream/RTCConfiguration.h:
(WebCore::RTCConfiguration::create):
* Modules/mediastream/RTCIceServer.h:
(WebCore::RTCIceServer::create):
* Modules/mediastream/RTCSessionDescription.cpp:
(WebCore::RTCSessionDescription::create):
* Modules/mediastream/RTCSessionDescription.h:
* Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
(WebCore::RTCSessionDescriptionRequestImpl::create):
* Modules/mediastream/RTCStatsReport.cpp:
(WebCore::RTCStatsReport::create):
* Modules/mediastream/RTCStatsReport.h:
* Modules/mediastream/RTCStatsRequestImpl.cpp:
(WebCore::RTCStatsRequestImpl::create):
* Modules/mediastream/RTCStatsRequestImpl.h:
* Modules/mediastream/RTCStatsResponse.cpp:
(WebCore::RTCStatsResponse::create):
* Modules/mediastream/RTCStatsResponse.h:
* Modules/mediastream/RTCVoidRequestImpl.cpp:
(WebCore::RTCVoidRequestImpl::create):
* Modules/mediastream/RTCVoidRequestImpl.h:
* Modules/mediastream/SourceInfo.cpp:
(WebCore::SourceInfo::create):
* Modules/mediastream/SourceInfo.h:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::create):
* Modules/mediastream/UserMediaRequest.h:
* Modules/quota/StorageInfo.h:
(WebCore::StorageInfo::create):
* Modules/quota/StorageQuota.h:
(WebCore::StorageQuota::create):
* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::create):
* Modules/speech/SpeechSynthesis.h:
* Modules/speech/SpeechSynthesisUtterance.cpp:
(WebCore::SpeechSynthesisUtterance::create):
* Modules/speech/SpeechSynthesisUtterance.h:
* Modules/speech/SpeechSynthesisVoice.cpp:
(WebCore::SpeechSynthesisVoice::create):
* Modules/speech/SpeechSynthesisVoice.h:
* Modules/webaudio/ChannelMergerNode.cpp:
(WebCore::ChannelMergerNode::create):
* Modules/webaudio/ChannelMergerNode.h:
* Modules/webaudio/ChannelSplitterNode.cpp:
(WebCore::ChannelSplitterNode::create):
* Modules/webaudio/ChannelSplitterNode.h:
* Modules/webaudio/DefaultAudioDestinationNode.h:
(WebCore::DefaultAudioDestinationNode::create):
* Modules/webaudio/GainNode.h:
(WebCore::GainNode::create):
* Modules/webaudio/MediaElementAudioSourceNode.cpp:
(WebCore::MediaElementAudioSourceNode::create):
* Modules/webaudio/MediaElementAudioSourceNode.h:
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::create):
* Modules/webaudio/MediaStreamAudioDestinationNode.h:
* Modules/webaudio/MediaStreamAudioSource.cpp:
(WebCore::MediaStreamAudioSource::create):
* Modules/webaudio/MediaStreamAudioSource.h:
* Modules/webaudio/MediaStreamAudioSourceNode.cpp:
(WebCore::MediaStreamAudioSourceNode::create):
* Modules/webaudio/MediaStreamAudioSourceNode.h:
* Modules/webaudio/OscillatorNode.cpp:
(WebCore::OscillatorNode::setType):
* Modules/webaudio/PannerNode.h:
(WebCore::PannerNode::create):
* Modules/webaudio/PeriodicWave.cpp:
(WebCore::PeriodicWave::create):
(WebCore::PeriodicWave::createSine):
(WebCore::PeriodicWave::createSquare):
(WebCore::PeriodicWave::createSawtooth):
(WebCore::PeriodicWave::createTriangle):
* Modules/webaudio/PeriodicWave.h:
* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::create):
* Modules/webaudio/ScriptProcessorNode.h:
* Modules/webaudio/WaveShaperNode.h:
(WebCore::WaveShaperNode::create):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184940 268f45cc-cd09-0410-ab3c-d52691b4dbfc

66 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediasource/SourceBufferList.h
Source/WebCore/Modules/mediastream/AllAudioCapabilities.h
Source/WebCore/Modules/mediastream/AllVideoCapabilities.h
Source/WebCore/Modules/mediastream/CapabilityRange.cpp
Source/WebCore/Modules/mediastream/CapabilityRange.h
Source/WebCore/Modules/mediastream/MediaSourceStates.cpp
Source/WebCore/Modules/mediastream/MediaSourceStates.h
Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp
Source/WebCore/Modules/mediastream/MediaStreamTrack.h
Source/WebCore/Modules/mediastream/MediaStreamTrackSourcesRequest.cpp
Source/WebCore/Modules/mediastream/MediaStreamTrackSourcesRequest.h
Source/WebCore/Modules/mediastream/MediaTrackConstraint.cpp
Source/WebCore/Modules/mediastream/MediaTrackConstraint.h
Source/WebCore/Modules/mediastream/MediaTrackConstraintSet.cpp
Source/WebCore/Modules/mediastream/MediaTrackConstraintSet.h
Source/WebCore/Modules/mediastream/MediaTrackConstraints.cpp
Source/WebCore/Modules/mediastream/MediaTrackConstraints.h
Source/WebCore/Modules/mediastream/NavigatorUserMediaError.h
Source/WebCore/Modules/mediastream/RTCConfiguration.h
Source/WebCore/Modules/mediastream/RTCIceServer.h
Source/WebCore/Modules/mediastream/RTCSessionDescription.cpp
Source/WebCore/Modules/mediastream/RTCSessionDescription.h
Source/WebCore/Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp
Source/WebCore/Modules/mediastream/RTCSessionDescriptionRequestImpl.h
Source/WebCore/Modules/mediastream/RTCStatsReport.cpp
Source/WebCore/Modules/mediastream/RTCStatsReport.h
Source/WebCore/Modules/mediastream/RTCStatsRequestImpl.cpp
Source/WebCore/Modules/mediastream/RTCStatsRequestImpl.h
Source/WebCore/Modules/mediastream/RTCStatsResponse.cpp
Source/WebCore/Modules/mediastream/RTCStatsResponse.h
Source/WebCore/Modules/mediastream/RTCVoidRequestImpl.cpp
Source/WebCore/Modules/mediastream/RTCVoidRequestImpl.h
Source/WebCore/Modules/mediastream/SourceInfo.cpp
Source/WebCore/Modules/mediastream/SourceInfo.h
Source/WebCore/Modules/mediastream/UserMediaRequest.cpp
Source/WebCore/Modules/mediastream/UserMediaRequest.h
Source/WebCore/Modules/quota/StorageInfo.h
Source/WebCore/Modules/quota/StorageQuota.h
Source/WebCore/Modules/speech/SpeechSynthesis.cpp
Source/WebCore/Modules/speech/SpeechSynthesis.h
Source/WebCore/Modules/speech/SpeechSynthesisUtterance.cpp
Source/WebCore/Modules/speech/SpeechSynthesisUtterance.h
Source/WebCore/Modules/speech/SpeechSynthesisVoice.cpp
Source/WebCore/Modules/speech/SpeechSynthesisVoice.h
Source/WebCore/Modules/webaudio/ChannelMergerNode.cpp
Source/WebCore/Modules/webaudio/ChannelMergerNode.h
Source/WebCore/Modules/webaudio/ChannelSplitterNode.cpp
Source/WebCore/Modules/webaudio/ChannelSplitterNode.h
Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.h
Source/WebCore/Modules/webaudio/GainNode.h
Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.cpp
Source/WebCore/Modules/webaudio/MediaElementAudioSourceNode.h
Source/WebCore/Modules/webaudio/MediaStreamAudioDestinationNode.cpp
Source/WebCore/Modules/webaudio/MediaStreamAudioDestinationNode.h
Source/WebCore/Modules/webaudio/MediaStreamAudioSource.cpp
Source/WebCore/Modules/webaudio/MediaStreamAudioSource.h
Source/WebCore/Modules/webaudio/MediaStreamAudioSourceNode.cpp
Source/WebCore/Modules/webaudio/MediaStreamAudioSourceNode.h
Source/WebCore/Modules/webaudio/OscillatorNode.cpp
Source/WebCore/Modules/webaudio/PannerNode.h
Source/WebCore/Modules/webaudio/PeriodicWave.cpp
Source/WebCore/Modules/webaudio/PeriodicWave.h
Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp
Source/WebCore/Modules/webaudio/ScriptProcessorNode.h
Source/WebCore/Modules/webaudio/WaveShaperNode.h

index 45bba2e..76a970c 100644 (file)
@@ -1,3 +1,112 @@
+2015-05-27  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
+
+        Purge PassRefPtr in WebCore/Modules - 2
+        https://bugs.webkit.org/show_bug.cgi?id=145304
+
+        Reviewed by Darin Adler.
+
+        As a step to remove PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr.
+
+        No new tests, no behavior changes
+
+        * Modules/mediasource/SourceBufferList.h:
+        * Modules/mediastream/AllAudioCapabilities.h:
+        (WebCore::AllAudioCapabilities::create):
+        * Modules/mediastream/AllVideoCapabilities.h:
+        (WebCore::AllVideoCapabilities::create):
+        * Modules/mediastream/CapabilityRange.cpp:
+        (WebCore::CapabilityRange::create):
+        * Modules/mediastream/CapabilityRange.h:
+        * Modules/mediastream/MediaSourceStates.cpp:
+        (WebCore::MediaSourceStates::create):
+        * Modules/mediastream/MediaStream.cpp:
+        (WebCore::MediaStream::create):
+        * Modules/mediastream/MediaStreamTrack.cpp:
+        (WebCore::MediaStreamTrack::create):
+        * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
+        (WebCore::MediaStreamTrackSourcesRequest::create):
+        * Modules/mediastream/MediaTrackConstraint.cpp:
+        (WebCore::MediaTrackConstraint::create):
+        * Modules/mediastream/MediaTrackConstraint.h:
+        * Modules/mediastream/RTCConfiguration.h:
+        (WebCore::RTCConfiguration::create):
+        * Modules/mediastream/RTCIceServer.h:
+        (WebCore::RTCIceServer::create):
+        * Modules/mediastream/RTCSessionDescription.cpp:
+        (WebCore::RTCSessionDescription::create):
+        * Modules/mediastream/RTCSessionDescription.h:
+        * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
+        (WebCore::RTCSessionDescriptionRequestImpl::create):
+        * Modules/mediastream/RTCStatsReport.cpp:
+        (WebCore::RTCStatsReport::create):
+        * Modules/mediastream/RTCStatsReport.h:
+        * Modules/mediastream/RTCStatsRequestImpl.cpp:
+        (WebCore::RTCStatsRequestImpl::create):
+        * Modules/mediastream/RTCStatsRequestImpl.h:
+        * Modules/mediastream/RTCStatsResponse.cpp:
+        (WebCore::RTCStatsResponse::create):
+        * Modules/mediastream/RTCStatsResponse.h:
+        * Modules/mediastream/RTCVoidRequestImpl.cpp:
+        (WebCore::RTCVoidRequestImpl::create):
+        * Modules/mediastream/RTCVoidRequestImpl.h:
+        * Modules/mediastream/SourceInfo.cpp:
+        (WebCore::SourceInfo::create):
+        * Modules/mediastream/SourceInfo.h:
+        * Modules/mediastream/UserMediaRequest.cpp:
+        (WebCore::UserMediaRequest::create):
+        * Modules/mediastream/UserMediaRequest.h:
+        * Modules/quota/StorageInfo.h:
+        (WebCore::StorageInfo::create):
+        * Modules/quota/StorageQuota.h:
+        (WebCore::StorageQuota::create):
+        * Modules/speech/SpeechSynthesis.cpp:
+        (WebCore::SpeechSynthesis::create):
+        * Modules/speech/SpeechSynthesis.h:
+        * Modules/speech/SpeechSynthesisUtterance.cpp:
+        (WebCore::SpeechSynthesisUtterance::create):
+        * Modules/speech/SpeechSynthesisUtterance.h:
+        * Modules/speech/SpeechSynthesisVoice.cpp:
+        (WebCore::SpeechSynthesisVoice::create):
+        * Modules/speech/SpeechSynthesisVoice.h:
+        * Modules/webaudio/ChannelMergerNode.cpp:
+        (WebCore::ChannelMergerNode::create):
+        * Modules/webaudio/ChannelMergerNode.h:
+        * Modules/webaudio/ChannelSplitterNode.cpp:
+        (WebCore::ChannelSplitterNode::create):
+        * Modules/webaudio/ChannelSplitterNode.h:
+        * Modules/webaudio/DefaultAudioDestinationNode.h:
+        (WebCore::DefaultAudioDestinationNode::create):
+        * Modules/webaudio/GainNode.h:
+        (WebCore::GainNode::create):
+        * Modules/webaudio/MediaElementAudioSourceNode.cpp:
+        (WebCore::MediaElementAudioSourceNode::create):
+        * Modules/webaudio/MediaElementAudioSourceNode.h:
+        * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
+        (WebCore::MediaStreamAudioDestinationNode::create):
+        * Modules/webaudio/MediaStreamAudioDestinationNode.h:
+        * Modules/webaudio/MediaStreamAudioSource.cpp:
+        (WebCore::MediaStreamAudioSource::create):
+        * Modules/webaudio/MediaStreamAudioSource.h:
+        * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
+        (WebCore::MediaStreamAudioSourceNode::create):
+        * Modules/webaudio/MediaStreamAudioSourceNode.h:
+        * Modules/webaudio/OscillatorNode.cpp:
+        (WebCore::OscillatorNode::setType):
+        * Modules/webaudio/PannerNode.h:
+        (WebCore::PannerNode::create):
+        * Modules/webaudio/PeriodicWave.cpp:
+        (WebCore::PeriodicWave::create):
+        (WebCore::PeriodicWave::createSine):
+        (WebCore::PeriodicWave::createSquare):
+        (WebCore::PeriodicWave::createSawtooth):
+        (WebCore::PeriodicWave::createTriangle):
+        * Modules/webaudio/PeriodicWave.h:
+        * Modules/webaudio/ScriptProcessorNode.cpp:
+        (WebCore::ScriptProcessorNode::create):
+        * Modules/webaudio/ScriptProcessorNode.h:
+        * Modules/webaudio/WaveShaperNode.h:
+        (WebCore::WaveShaperNode::create):
+
 2015-05-27  Simon Fraser  <simon.fraser@apple.com>
 
         REGRESSION (r183820): webkit.org/blog/ background painting issue on reload, when the page contains videos
index 6bcb935..4bf3617 100644 (file)
@@ -45,9 +45,9 @@ class SourceBuffer;
 
 class SourceBufferList final : public RefCounted<SourceBufferList>, public ScriptWrappable, public EventTargetWithInlineData {
 public:
-    static PassRefPtr<SourceBufferList> create(ScriptExecutionContext* context)
+    static Ref<SourceBufferList> create(ScriptExecutionContext* context)
     {
-        return adoptRef(new SourceBufferList(context));
+        return adoptRef(*new SourceBufferList(context));
     }
     virtual ~SourceBufferList();
 
index 60623e6..9fc8397 100644 (file)
@@ -39,9 +39,9 @@ class RealtimeMediaSourceCapabilities;
 
 class AllAudioCapabilities : public MediaStreamCapabilities {
 public:
-    static RefPtr<AllAudioCapabilities> create(PassRefPtr<RealtimeMediaSourceCapabilities> capabilities)
+    static Ref<AllAudioCapabilities> create(PassRefPtr<RealtimeMediaSourceCapabilities> capabilities)
     {
-        return adoptRef(new AllAudioCapabilities(capabilities));
+        return adoptRef(*new AllAudioCapabilities(capabilities));
     }
     virtual ~AllAudioCapabilities() { }
 
index 02e458a..0187c30 100644 (file)
@@ -37,9 +37,9 @@ class RealtimeMediaSourceCapabilities;
 
 class AllVideoCapabilities : public MediaStreamCapabilities {
 public:
-    static RefPtr<AllVideoCapabilities> create(PassRefPtr<RealtimeMediaSourceCapabilities> capabilities)
+    static Ref<AllVideoCapabilities> create(PassRefPtr<RealtimeMediaSourceCapabilities> capabilities)
     {
-        return adoptRef(new AllVideoCapabilities(capabilities));
+        return adoptRef(*new AllVideoCapabilities(capabilities));
     }
     virtual ~AllVideoCapabilities() { }
 
index f9a279b..614e4c6 100644 (file)
@@ -40,9 +40,9 @@ using namespace JSC;
 
 namespace WebCore {
 
-RefPtr<CapabilityRange> CapabilityRange::create(const RealtimeMediaSourceCapabilityRange& rangeInfo)
+Ref<CapabilityRange> CapabilityRange::create(const RealtimeMediaSourceCapabilityRange& rangeInfo)
 {
-    return adoptRef(new CapabilityRange(rangeInfo));
+    return adoptRef(*new CapabilityRange(rangeInfo));
 }
 
 CapabilityRange::CapabilityRange(const RealtimeMediaSourceCapabilityRange& rangeInfo)
index fe23283..7d8bba3 100644 (file)
@@ -41,7 +41,7 @@ class CapabilityRange : public RefCounted<CapabilityRange>, public ScriptWrappab
 public:
     virtual ~CapabilityRange() { }
 
-    static RefPtr<CapabilityRange> create(const RealtimeMediaSourceCapabilityRange&);
+    static Ref<CapabilityRange> create(const RealtimeMediaSourceCapabilityRange&);
 
     Deprecated::ScriptValue min(JSC::ExecState*) const;
     Deprecated::ScriptValue max(JSC::ExecState*) const;
index 19c103a..7637abf 100644 (file)
@@ -33,9 +33,9 @@
 
 namespace WebCore {
 
-RefPtr<MediaSourceStates> MediaSourceStates::create(const RealtimeMediaSourceStates& states)
+Ref<MediaSourceStates> MediaSourceStates::create(const RealtimeMediaSourceStates& states)
 {
-    return adoptRef(new MediaSourceStates(states));
+    return adoptRef(*new MediaSourceStates(states));
 }
 
 MediaSourceStates::MediaSourceStates(const RealtimeMediaSourceStates& states)
index c34fa0a..c46373d 100644 (file)
@@ -37,7 +37,7 @@ namespace WebCore {
 
 class MediaSourceStates : public RefCounted<MediaSourceStates>, public ScriptWrappable {
 public:
-    static RefPtr<MediaSourceStates> create(const RealtimeMediaSourceStates&);
+    static Ref<MediaSourceStates> create(const RealtimeMediaSourceStates&);
 
     const AtomicString& sourceType() const;
     const AtomicString& sourceId() const { return m_sourceStates.sourceId(); }
index 6adb4fe..3fabab1 100644 (file)
 
 namespace WebCore {
 
-RefPtr<MediaStreamTrack> MediaStreamTrack::create(ScriptExecutionContext& context, MediaStreamTrackPrivate& privateTrack)
+Ref<MediaStreamTrack> MediaStreamTrack::create(ScriptExecutionContext& context, MediaStreamTrackPrivate& privateTrack)
 {
-    return adoptRef(new MediaStreamTrack(context, privateTrack));
+    return adoptRef(*new MediaStreamTrack(context, privateTrack));
 }
 
-RefPtr<MediaStreamTrack> MediaStreamTrack::create(MediaStreamTrack& track)
+Ref<MediaStreamTrack> MediaStreamTrack::create(MediaStreamTrack& track)
 {
-    return adoptRef(new MediaStreamTrack(track));
+    return adoptRef(*new MediaStreamTrack(track));
 }
 
 MediaStreamTrack::MediaStreamTrack(ScriptExecutionContext& context, MediaStreamTrackPrivate& privateTrack)
index aeed103..1d09cc4 100644 (file)
@@ -57,8 +57,8 @@ public:
         virtual void trackDidEnd() = 0;
     };
 
-    static RefPtr<MediaStreamTrack> create(ScriptExecutionContext&, MediaStreamTrackPrivate&);
-    static RefPtr<MediaStreamTrack> create(MediaStreamTrack&);
+    static Ref<MediaStreamTrack> create(ScriptExecutionContext&, MediaStreamTrackPrivate&);
+    static Ref<MediaStreamTrack> create(MediaStreamTrack&);
     virtual ~MediaStreamTrack();
 
     const AtomicString& kind() const;
index 962ff06..fb2c512 100644 (file)
@@ -37,9 +37,9 @@
 
 namespace WebCore {
 
-PassRefPtr<MediaStreamTrackSourcesRequest> MediaStreamTrackSourcesRequest::create(ScriptExecutionContext* context, PassRefPtr<MediaStreamTrackSourcesCallback> callback)
+Ref<MediaStreamTrackSourcesRequest> MediaStreamTrackSourcesRequest::create(ScriptExecutionContext* context, PassRefPtr<MediaStreamTrackSourcesCallback> callback)
 {
-    return adoptRef(new MediaStreamTrackSourcesRequest(context, callback));
+    return adoptRef(*new MediaStreamTrackSourcesRequest(context, callback));
 }
 
 MediaStreamTrackSourcesRequest::MediaStreamTrackSourcesRequest(ScriptExecutionContext* context, PassRefPtr<MediaStreamTrackSourcesCallback> callback)
index 1339b1b..3966cef 100644 (file)
@@ -41,7 +41,7 @@ class ScriptExecutionContext;
 
 class MediaStreamTrackSourcesRequest : public MediaStreamTrackSourcesRequestClient {
 public:
-    static PassRefPtr<MediaStreamTrackSourcesRequest> create(ScriptExecutionContext*, PassRefPtr<MediaStreamTrackSourcesCallback>);
+    static Ref<MediaStreamTrackSourcesRequest> create(ScriptExecutionContext*, PassRefPtr<MediaStreamTrackSourcesCallback>);
     virtual ~MediaStreamTrackSourcesRequest() { }
 
 private:
index b10fca2..3c77c02 100644 (file)
@@ -34,9 +34,9 @@ using namespace JSC;
 
 namespace WebCore {
 
-RefPtr<MediaTrackConstraint> MediaTrackConstraint::create(const Dictionary& constraint)
+Ref<MediaTrackConstraint> MediaTrackConstraint::create(const Dictionary& constraint)
 {
-    return adoptRef(new MediaTrackConstraint(constraint));
+    return adoptRef(*new MediaTrackConstraint(constraint));
 }
 
 MediaTrackConstraint::MediaTrackConstraint(const Dictionary& constraint)
index 5b9d705..c2a882f 100644 (file)
@@ -41,7 +41,7 @@ namespace WebCore {
 
 class MediaTrackConstraint : public RefCounted<MediaTrackConstraint>, public ScriptWrappable {
 public:
-    static RefPtr<MediaTrackConstraint> create(const Dictionary&);
+    static Ref<MediaTrackConstraint> create(const Dictionary&);
 
     virtual ~MediaTrackConstraint();
 
index 8cd0246..0b01951 100644 (file)
@@ -34,9 +34,9 @@ using namespace JSC;
 
 namespace WebCore {
 
-RefPtr<MediaTrackConstraintSet> MediaTrackConstraintSet::create(const Dictionary& constraints)
+Ref<MediaTrackConstraintSet> MediaTrackConstraintSet::create(const Dictionary& constraints)
 {
-    return adoptRef(new MediaTrackConstraintSet(constraints));
+    return adoptRef(*new MediaTrackConstraintSet(constraints));
 }
 
 MediaTrackConstraintSet::MediaTrackConstraintSet(const Dictionary& constraints)
index eca2e9a..09c53c2 100644 (file)
@@ -37,7 +37,7 @@ namespace WebCore {
 
 class MediaTrackConstraintSet : public RefCounted<MediaTrackConstraintSet>, public ScriptWrappable {
 public:
-    static RefPtr<MediaTrackConstraintSet> create(const Dictionary&);
+    static Ref<MediaTrackConstraintSet> create(const Dictionary&);
 
     virtual ~MediaTrackConstraintSet();
 
index cbf21e5..be7db86 100644 (file)
@@ -38,9 +38,9 @@ using namespace JSC;
 
 namespace WebCore {
 
-RefPtr<MediaTrackConstraints> MediaTrackConstraints::create(PassRefPtr<MediaConstraintsImpl> constraints)
+Ref<MediaTrackConstraints> MediaTrackConstraints::create(PassRefPtr<MediaConstraintsImpl> constraints)
 {
-    return adoptRef(new MediaTrackConstraints(constraints));
+    return adoptRef(*new MediaTrackConstraints(constraints));
 }
 
 MediaTrackConstraints::MediaTrackConstraints(PassRefPtr<MediaConstraintsImpl> constraints)
index 6f95f55..0096241 100644 (file)
@@ -42,7 +42,7 @@ class MediaTrackConstraints : public RefCounted<MediaTrackConstraints>, public S
 public:
     virtual ~MediaTrackConstraints() { }
 
-    static RefPtr<MediaTrackConstraints> create(PassRefPtr<MediaConstraintsImpl>);
+    static Ref<MediaTrackConstraints> create(PassRefPtr<MediaConstraintsImpl>);
 
     Vector<PassRefPtr<MediaTrackConstraint>> optional(bool) const;
     RefPtr<MediaTrackConstraintSet> mandatory(bool) const;
index ea37871..c17ef40 100644 (file)
@@ -36,9 +36,9 @@ namespace WebCore {
 
 class NavigatorUserMediaError : public DOMError {
 public:
-    static PassRefPtr<NavigatorUserMediaError> create(const String& name, const String& constraintName)
+    static Ref<NavigatorUserMediaError> create(const String& name, const String& constraintName)
     {
-        return adoptRef(new NavigatorUserMediaError(name, constraintName));
+        return adoptRef(*new NavigatorUserMediaError(name, constraintName));
     }
 
     virtual ~NavigatorUserMediaError() { }
index 41051a9..4ffa96e 100644 (file)
@@ -44,7 +44,7 @@ namespace WebCore {
 
 class RTCConfiguration : public RefCounted<RTCConfiguration> {
 public:
-    static PassRefPtr<RTCConfiguration> create() { return adoptRef(new RTCConfiguration()); }
+    static Ref<RTCConfiguration> create() { return adoptRef(*new RTCConfiguration()); }
     virtual ~RTCConfiguration() { }
 
     void appendServer(PassRefPtr<RTCIceServer> server) { m_private->appendServer(server->privateServer()); }
index eca258f..4218d2b 100644 (file)
@@ -38,14 +38,14 @@ namespace WebCore {
 
 class RTCIceServer : public RefCounted<RTCIceServer> {
 public:
-    static PassRefPtr<RTCIceServer> create(const Vector<String>& urls, const String& credential, const String& username)
+    static Ref<RTCIceServer> create(const Vector<String>& urls, const String& credential, const String& username)
     {
-        return adoptRef(new RTCIceServer(urls, credential, username));
+        return adoptRef(*new RTCIceServer(urls, credential, username));
     }
 
-    static PassRefPtr<RTCIceServer> create(PassRefPtr<RTCIceServerPrivate> server)
+    static Ref<RTCIceServer> create(PassRefPtr<RTCIceServerPrivate> server)
     {
-        return adoptRef(new RTCIceServer(server));
+        return adoptRef(*new RTCIceServer(server));
     }
 
     virtual ~RTCIceServer() { }
index 85bfb5c..dd91311 100644 (file)
@@ -46,7 +46,7 @@ static bool verifyType(const String& type)
     return type == "offer" || type == "pranswer" || type == "answer";
 }
 
-PassRefPtr<RTCSessionDescription> RTCSessionDescription::create(const Dictionary& dictionary, ExceptionCode& ec)
+RefPtr<RTCSessionDescription> RTCSessionDescription::create(const Dictionary& dictionary, ExceptionCode& ec)
 {
     String type;
     bool ok = dictionary.get("type", type);
@@ -62,13 +62,13 @@ PassRefPtr<RTCSessionDescription> RTCSessionDescription::create(const Dictionary
         return nullptr;
     }
 
-    return adoptRef(new RTCSessionDescription(RTCSessionDescriptionDescriptor::create(type, sdp)));
+    return adoptRef(*new RTCSessionDescription(RTCSessionDescriptionDescriptor::create(type, sdp)));
 }
 
-PassRefPtr<RTCSessionDescription> RTCSessionDescription::create(PassRefPtr<RTCSessionDescriptionDescriptor> descriptor)
+RefPtr<RTCSessionDescription> RTCSessionDescription::create(PassRefPtr<RTCSessionDescriptionDescriptor> descriptor)
 {
     ASSERT(descriptor);
-    return adoptRef(new RTCSessionDescription(descriptor));
+    return adoptRef(*new RTCSessionDescription(descriptor));
 }
 
 RTCSessionDescription::RTCSessionDescription(PassRefPtr<RTCSessionDescriptionDescriptor> descriptor)
index fafe2b6..bcb3354 100644 (file)
@@ -46,8 +46,8 @@ class RTCSessionDescriptionDescriptor;
 
 class RTCSessionDescription : public RefCounted<RTCSessionDescription>, public ScriptWrappable {
 public:
-    static PassRefPtr<RTCSessionDescription> create(const Dictionary&, ExceptionCode&);
-    static PassRefPtr<RTCSessionDescription> create(PassRefPtr<RTCSessionDescriptionDescriptor>);
+    static RefPtr<RTCSessionDescription> create(const Dictionary&, ExceptionCode&);
+    static RefPtr<RTCSessionDescription> create(PassRefPtr<RTCSessionDescriptionDescriptor>);
     virtual ~RTCSessionDescription();
 
     const String& type() const;
index 4b2ad7e..d710dc1 100644 (file)
 
 namespace WebCore {
 
-PassRefPtr<RTCSessionDescriptionRequestImpl> RTCSessionDescriptionRequestImpl::create(ScriptExecutionContext* context, PassRefPtr<RTCSessionDescriptionCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback)
+Ref<RTCSessionDescriptionRequestImpl> RTCSessionDescriptionRequestImpl::create(ScriptExecutionContext* context, PassRefPtr<RTCSessionDescriptionCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback)
 {
-    RefPtr<RTCSessionDescriptionRequestImpl> request = adoptRef(new RTCSessionDescriptionRequestImpl(context, successCallback, errorCallback));
+    Ref<RTCSessionDescriptionRequestImpl> request = adoptRef(*new RTCSessionDescriptionRequestImpl(context, successCallback, errorCallback));
     request->suspendIfNeeded();
-    return request.release();
+    return request;
 }
 
 RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl(ScriptExecutionContext* context, PassRefPtr<RTCSessionDescriptionCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback)
index 2d78b50..ed673b8 100644 (file)
@@ -45,7 +45,7 @@ class RTCSessionDescriptionCallback;
 
 class RTCSessionDescriptionRequestImpl : public RTCSessionDescriptionRequest, public ActiveDOMObject {
 public:
-    static PassRefPtr<RTCSessionDescriptionRequestImpl> create(ScriptExecutionContext*, PassRefPtr<RTCSessionDescriptionCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>);
+    static Ref<RTCSessionDescriptionRequestImpl> create(ScriptExecutionContext*, PassRefPtr<RTCSessionDescriptionCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>);
     virtual ~RTCSessionDescriptionRequestImpl();
 
     virtual void requestSucceeded(PassRefPtr<RTCSessionDescriptionDescriptor>) override;
index 27937eb..989a76f 100644 (file)
@@ -33,9 +33,9 @@
 
 namespace WebCore {
 
-PassRefPtr<RTCStatsReport> RTCStatsReport::create(const String& id, const String& type, double timestamp)
+Ref<RTCStatsReport> RTCStatsReport::create(const String& id, const String& type, double timestamp)
 {
-    return adoptRef(new RTCStatsReport(id, type, timestamp));
+    return adoptRef(*new RTCStatsReport(id, type, timestamp));
 }
 
 RTCStatsReport::RTCStatsReport(const String& id, const String& type, double timestamp)
index f7b8afe..f93a3dd 100644 (file)
@@ -36,7 +36,7 @@ namespace WebCore {
 
 class RTCStatsReport : public RefCounted<RTCStatsReport>, public ScriptWrappable {
 public:
-    static PassRefPtr<RTCStatsReport> create(const String& id, const String& type, double timestamp);
+    static Ref<RTCStatsReport> create(const String& id, const String& type, double timestamp);
 
     double timestamp() const { return m_timestamp; }
     String id() { return m_id; }
index 911a2f9..deb19a9 100644 (file)
 
 namespace WebCore {
 
-PassRefPtr<RTCStatsRequestImpl> RTCStatsRequestImpl::create(ScriptExecutionContext* context, PassRefPtr<RTCStatsCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback, PassRefPtr<MediaStreamTrackPrivate> selector)
+Ref<RTCStatsRequestImpl> RTCStatsRequestImpl::create(ScriptExecutionContext* context, PassRefPtr<RTCStatsCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback, PassRefPtr<MediaStreamTrackPrivate> selector)
 {
-    RefPtr<RTCStatsRequestImpl> request = adoptRef(new RTCStatsRequestImpl(context, successCallback, errorCallback, selector));
+    Ref<RTCStatsRequestImpl> request = adoptRef(*new RTCStatsRequestImpl(context, successCallback, errorCallback, selector));
     request->suspendIfNeeded();
-    return request.release();
+    return request;
 }
 
 RTCStatsRequestImpl::RTCStatsRequestImpl(ScriptExecutionContext* context, PassRefPtr<RTCStatsCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback, PassRefPtr<MediaStreamTrackPrivate> selector)
index 4e8ed71..7b62276 100644 (file)
@@ -41,7 +41,7 @@ class RTCPeerConnectionErrorCallback;
 
 class RTCStatsRequestImpl : public RTCStatsRequest, public ActiveDOMObject {
 public:
-    static PassRefPtr<RTCStatsRequestImpl> create(ScriptExecutionContext*, PassRefPtr<RTCStatsCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>, PassRefPtr<MediaStreamTrackPrivate>);
+    static Ref<RTCStatsRequestImpl> create(ScriptExecutionContext*, PassRefPtr<RTCStatsCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>, PassRefPtr<MediaStreamTrackPrivate>);
     virtual ~RTCStatsRequestImpl();
 
     virtual PassRefPtr<RTCStatsResponseBase> createResponse() override;
index c3b41fe..bb3ee32 100644 (file)
@@ -30,9 +30,9 @@
 
 namespace WebCore {
 
-PassRefPtr<RTCStatsResponse> RTCStatsResponse::create()
+Ref<RTCStatsResponse> RTCStatsResponse::create()
 {
-    return adoptRef(new RTCStatsResponse());
+    return adoptRef(*new RTCStatsResponse());
 }
 
 RTCStatsResponse::RTCStatsResponse()
index 3a458ff..d41b9b8 100644 (file)
@@ -41,7 +41,7 @@ namespace WebCore {
 
 class RTCStatsResponse : public RTCStatsResponseBase, public ScriptWrappable {
 public:
-    static PassRefPtr<RTCStatsResponse> create();
+    static Ref<RTCStatsResponse> create();
 
     const Vector<RefPtr<RTCStatsReport>>& result() const { return m_result; };
 
index b7db21b..82f8a12 100644 (file)
 
 namespace WebCore {
 
-PassRefPtr<RTCVoidRequestImpl> RTCVoidRequestImpl::create(ScriptExecutionContext* context, PassRefPtr<VoidCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback)
+Ref<RTCVoidRequestImpl> RTCVoidRequestImpl::create(ScriptExecutionContext* context, PassRefPtr<VoidCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback)
 {
-    RefPtr<RTCVoidRequestImpl> request = adoptRef(new RTCVoidRequestImpl(context, successCallback, errorCallback));
+    Ref<RTCVoidRequestImpl> request = adoptRef(*new RTCVoidRequestImpl(context, successCallback, errorCallback));
     request->suspendIfNeeded();
-    return request.release();
+    return request;
 }
 
 RTCVoidRequestImpl::RTCVoidRequestImpl(ScriptExecutionContext* context, PassRefPtr<VoidCallback> successCallback, PassRefPtr<RTCPeerConnectionErrorCallback> errorCallback)
index a403eb2..94b8b89 100644 (file)
@@ -44,7 +44,7 @@ class VoidCallback;
 
 class RTCVoidRequestImpl : public RTCVoidRequest, public ActiveDOMObject {
 public:
-    static PassRefPtr<RTCVoidRequestImpl> create(ScriptExecutionContext*, PassRefPtr<VoidCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>);
+    static Ref<RTCVoidRequestImpl> create(ScriptExecutionContext*, PassRefPtr<VoidCallback>, PassRefPtr<RTCPeerConnectionErrorCallback>);
     virtual ~RTCVoidRequestImpl();
 
     virtual void requestSucceeded() override;
index b116f2f..4bb4ef8 100644 (file)
@@ -33,9 +33,9 @@
 
 namespace WebCore {
 
-PassRefPtr<SourceInfo> SourceInfo::create(PassRefPtr<TrackSourceInfo> trackSourceInfo)
+Ref<SourceInfo> SourceInfo::create(PassRefPtr<TrackSourceInfo> trackSourceInfo)
 {
-    return adoptRef(new SourceInfo(trackSourceInfo));
+    return adoptRef(*new SourceInfo(trackSourceInfo));
 }
 
 SourceInfo::SourceInfo(PassRefPtr<TrackSourceInfo> trackSourceInfo)
index 23f162e..e5abe0c 100644 (file)
@@ -40,7 +40,7 @@ namespace WebCore {
 
 class SourceInfo : public RefCounted<SourceInfo>, public ScriptWrappable {
 public:
-    static PassRefPtr<SourceInfo> create(PassRefPtr<TrackSourceInfo>);
+    static Ref<SourceInfo> create(PassRefPtr<TrackSourceInfo>);
 
     const AtomicString& sourceId() const { return m_trackSourceInfo->id(); }
     const AtomicString& label() const { return m_trackSourceInfo->label(); }
index 4a9ae63..f0fc63a 100644 (file)
@@ -71,7 +71,7 @@ static PassRefPtr<MediaConstraints> parseOptions(const Dictionary& options, cons
     return constraints.release();
 }
 
-PassRefPtr<UserMediaRequest> UserMediaRequest::create(ScriptExecutionContext* context, UserMediaController* controller, const Dictionary& options, PassRefPtr<NavigatorUserMediaSuccessCallback> successCallback, PassRefPtr<NavigatorUserMediaErrorCallback> errorCallback, ExceptionCode& ec)
+RefPtr<UserMediaRequest> UserMediaRequest::create(ScriptExecutionContext* context, UserMediaController* controller, const Dictionary& options, PassRefPtr<NavigatorUserMediaSuccessCallback> successCallback, PassRefPtr<NavigatorUserMediaErrorCallback> errorCallback, ExceptionCode& ec)
 {
     ASSERT(successCallback);
 
@@ -86,7 +86,7 @@ PassRefPtr<UserMediaRequest> UserMediaRequest::create(ScriptExecutionContext* co
     return UserMediaRequest::create(context, controller, options, WTF::move(resolveCallback), WTF::move(rejectCallback), ec);
 }
 
-PassRefPtr<UserMediaRequest> UserMediaRequest::create(ScriptExecutionContext* context, UserMediaController* controller, const Dictionary& options, MediaDevices::ResolveCallback resolveCallback, MediaDevices::RejectCallback rejectCallback, ExceptionCode& ec)
+RefPtr<UserMediaRequest> UserMediaRequest::create(ScriptExecutionContext* context, UserMediaController* controller, const Dictionary& options, MediaDevices::ResolveCallback resolveCallback, MediaDevices::RejectCallback rejectCallback, ExceptionCode& ec)
 {
     ASSERT(resolveCallback && rejectCallback);
 
@@ -101,7 +101,7 @@ PassRefPtr<UserMediaRequest> UserMediaRequest::create(ScriptExecutionContext* co
     if (!audioConstraints && !videoConstraints)
         return nullptr;
 
-    return adoptRef(new UserMediaRequest(context, controller, audioConstraints.release(), videoConstraints.release(), WTF::move(resolveCallback), WTF::move(rejectCallback)));
+    return adoptRef(*new UserMediaRequest(context, controller, audioConstraints.release(), videoConstraints.release(), WTF::move(resolveCallback), WTF::move(rejectCallback)));
 }
 
 UserMediaRequest::UserMediaRequest(ScriptExecutionContext* context, UserMediaController* controller, PassRefPtr<MediaConstraints> audioConstraints, PassRefPtr<MediaConstraints> videoConstraints, MediaDevices::ResolveCallback resolveCallback, MediaDevices::RejectCallback rejectCallback)
index 0c684ad..e359a91 100644 (file)
@@ -58,8 +58,8 @@ typedef int ExceptionCode;
 
 class UserMediaRequest : public MediaStreamCreationClient, public ContextDestructionObserver {
 public:
-    static PassRefPtr<UserMediaRequest> create(ScriptExecutionContext*, UserMediaController*, const Dictionary& options, PassRefPtr<NavigatorUserMediaSuccessCallback>, PassRefPtr<NavigatorUserMediaErrorCallback>, ExceptionCode&);
-    static PassRefPtr<UserMediaRequest> create(ScriptExecutionContext*, UserMediaController*, const Dictionary& options, MediaDevices::ResolveCallback, MediaDevices::RejectCallback, ExceptionCode&);
+    static RefPtr<UserMediaRequest> create(ScriptExecutionContext*, UserMediaController*, const Dictionary& options, PassRefPtr<NavigatorUserMediaSuccessCallback>, PassRefPtr<NavigatorUserMediaErrorCallback>, ExceptionCode&);
+    static RefPtr<UserMediaRequest> create(ScriptExecutionContext*, UserMediaController*, const Dictionary& options, MediaDevices::ResolveCallback, MediaDevices::RejectCallback, ExceptionCode&);
     ~UserMediaRequest();
 
     WEBCORE_EXPORT SecurityOrigin* securityOrigin() const;
index dd50579..7c5263c 100644 (file)
@@ -52,9 +52,9 @@ public:
         PERSISTENT,
     };
 
-    static PassRefPtr<StorageInfo> create()
+    static Ref<StorageInfo> create()
     {
-        return adoptRef(new StorageInfo());
+        return adoptRef(*new StorageInfo());
     }
 
     void queryUsageAndQuota(ScriptExecutionContext*, int storageType, PassRefPtr<StorageUsageCallback>, PassRefPtr<StorageErrorCallback>);
index 26504f9..5b9d39a 100644 (file)
@@ -50,9 +50,9 @@ public:
         Persistent,
     };
 
-    static PassRefPtr<StorageQuota> create(Type type)
+    static Ref<StorageQuota> create(Type type)
     {
-        return adoptRef(new StorageQuota(type));
+        return adoptRef(*new StorageQuota(type));
     }
 
     void queryUsageAndQuota(ScriptExecutionContext*, PassRefPtr<StorageUsageCallback>, PassRefPtr<StorageErrorCallback>);
index 5dd47cc..7850340 100644 (file)
@@ -37,9 +37,9 @@
 
 namespace WebCore {
     
-PassRefPtr<SpeechSynthesis> SpeechSynthesis::create()
+Ref<SpeechSynthesis> SpeechSynthesis::create()
 {
-    return adoptRef(new SpeechSynthesis);
+    return adoptRef(*new SpeechSynthesis);
 }
     
 SpeechSynthesis::SpeechSynthesis()
index da61f90..3220330 100644 (file)
@@ -44,7 +44,7 @@ class SpeechSynthesisVoice;
     
 class SpeechSynthesis : public PlatformSpeechSynthesizerClient, public RefCounted<SpeechSynthesis> {
 public:
-    static PassRefPtr<SpeechSynthesis> create();
+    static Ref<SpeechSynthesis> create();
     
     bool pending() const;
     bool speaking() const;
index 0b6c74e..8e79e9d 100644 (file)
@@ -30,9 +30,9 @@
 
 namespace WebCore {
     
-PassRefPtr<SpeechSynthesisUtterance> SpeechSynthesisUtterance::create(ScriptExecutionContext& context, const String& text)
+Ref<SpeechSynthesisUtterance> SpeechSynthesisUtterance::create(ScriptExecutionContext& context, const String& text)
 {
-    return adoptRef(new SpeechSynthesisUtterance(context, text));
+    return adoptRef(*new SpeechSynthesisUtterance(context, text));
 }
 
 SpeechSynthesisUtterance::SpeechSynthesisUtterance(ScriptExecutionContext& context, const String& text)
index 1cd8e5a..19016df 100644 (file)
@@ -39,7 +39,7 @@ namespace WebCore {
 
 class SpeechSynthesisUtterance final : public PlatformSpeechSynthesisUtteranceClient, public RefCounted<SpeechSynthesisUtterance>, public ContextDestructionObserver, public EventTargetWithInlineData {
 public:
-    static PassRefPtr<SpeechSynthesisUtterance> create(ScriptExecutionContext&, const String&);
+    static Ref<SpeechSynthesisUtterance> create(ScriptExecutionContext&, const String&);
     
     ~SpeechSynthesisUtterance();
 
index 2f9ad6e..dd1cf09 100644 (file)
@@ -30,9 +30,9 @@
 
 namespace WebCore {
     
-PassRefPtr<SpeechSynthesisVoice> SpeechSynthesisVoice::create(PassRefPtr<PlatformSpeechSynthesisVoice> voice)
+Ref<SpeechSynthesisVoice> SpeechSynthesisVoice::create(PassRefPtr<PlatformSpeechSynthesisVoice> voice)
 {
-    return adoptRef(new SpeechSynthesisVoice(voice));
+    return adoptRef(*new SpeechSynthesisVoice(voice));
 }
 
 SpeechSynthesisVoice::SpeechSynthesisVoice(PassRefPtr<PlatformSpeechSynthesisVoice> voice)
index ab55408..d5b8848 100644 (file)
@@ -38,7 +38,7 @@ namespace WebCore {
 class SpeechSynthesisVoice : public RefCounted<SpeechSynthesisVoice> {
 public:
     virtual ~SpeechSynthesisVoice() { }
-    static PassRefPtr<SpeechSynthesisVoice> create(PassRefPtr<PlatformSpeechSynthesisVoice>);
+    static Ref<SpeechSynthesisVoice> create(PassRefPtr<PlatformSpeechSynthesisVoice>);
     
     const String& voiceURI() const { return m_platformVoice->voiceURI(); }
     const String& name() const { return m_platformVoice->name(); }
index ca222ec..52d23b3 100644 (file)
@@ -40,12 +40,12 @@ const unsigned DefaultNumberOfOutputChannels = 1;
 
 namespace WebCore {
 
-PassRefPtr<ChannelMergerNode> ChannelMergerNode::create(AudioContext* context, float sampleRate, unsigned numberOfInputs)
+RefPtr<ChannelMergerNode> ChannelMergerNode::create(AudioContext* context, float sampleRate, unsigned numberOfInputs)
 {
     if (!numberOfInputs || numberOfInputs > AudioContext::maxNumberOfChannels())
         return nullptr;
     
-    return adoptRef(new ChannelMergerNode(context, sampleRate, numberOfInputs));      
+    return adoptRef(*new ChannelMergerNode(context, sampleRate, numberOfInputs));      
 }
 
 ChannelMergerNode::ChannelMergerNode(AudioContext* context, float sampleRate, unsigned numberOfInputs)
index d065edb..c55c2eb 100644 (file)
@@ -38,7 +38,7 @@ class AudioContext;
     
 class ChannelMergerNode : public AudioNode {
 public:
-    static PassRefPtr<ChannelMergerNode> create(AudioContext*, float sampleRate, unsigned numberOfInputs);
+    static RefPtr<ChannelMergerNode> create(AudioContext*, float sampleRate, unsigned numberOfInputs);
 
     // AudioNode
     virtual void process(size_t framesToProcess) override;
index 88ed29d..7bfe4d0 100644 (file)
 
 namespace WebCore {
     
-PassRefPtr<ChannelSplitterNode> ChannelSplitterNode::create(AudioContext* context, float sampleRate, unsigned numberOfOutputs)
+RefPtr<ChannelSplitterNode> ChannelSplitterNode::create(AudioContext* context, float sampleRate, unsigned numberOfOutputs)
 {
     if (!numberOfOutputs || numberOfOutputs > AudioContext::maxNumberOfChannels())
         return nullptr;
 
-    return adoptRef(new ChannelSplitterNode(context, sampleRate, numberOfOutputs));      
+    return adoptRef(*new ChannelSplitterNode(context, sampleRate, numberOfOutputs));      
 }
 
 ChannelSplitterNode::ChannelSplitterNode(AudioContext* context, float sampleRate, unsigned numberOfOutputs)
index 9d07279..c3c71dc 100644 (file)
@@ -34,7 +34,7 @@ class AudioContext;
     
 class ChannelSplitterNode : public AudioNode {
 public:
-    static PassRefPtr<ChannelSplitterNode> create(AudioContext*, float sampleRate, unsigned numberOfOutputs);
+    static RefPtr<ChannelSplitterNode> create(AudioContext*, float sampleRate, unsigned numberOfOutputs);
 
     // AudioNode
     virtual void process(size_t framesToProcess) override;
index b1d628d..1e85cc8 100644 (file)
@@ -35,9 +35,9 @@ class AudioContext;
     
 class DefaultAudioDestinationNode : public AudioDestinationNode {
 public:
-    static PassRefPtr<DefaultAudioDestinationNode> create(AudioContext* context)
+    static Ref<DefaultAudioDestinationNode> create(AudioContext* context)
     {
-        return adoptRef(new DefaultAudioDestinationNode(context));     
+        return adoptRef(*new DefaultAudioDestinationNode(context));     
     }
 
     virtual ~DefaultAudioDestinationNode();
index 3a8c5df..6fc6fa5 100644 (file)
@@ -39,9 +39,9 @@ class AudioContext;
 
 class GainNode : public AudioNode {
 public:
-    static PassRefPtr<GainNode> create(AudioContext* context, float sampleRate)
+    static Ref<GainNode> create(AudioContext* context, float sampleRate)
     {
-        return adoptRef(new GainNode(context, sampleRate));
+        return adoptRef(*new GainNode(context, sampleRate));
     }
 
     // AudioNode
index 0e50258..b32fd5d 100644 (file)
@@ -40,9 +40,9 @@ const unsigned maxSampleRate = 192000;
 
 namespace WebCore {
 
-PassRefPtr<MediaElementAudioSourceNode> MediaElementAudioSourceNode::create(AudioContext* context, HTMLMediaElement* mediaElement)
+Ref<MediaElementAudioSourceNode> MediaElementAudioSourceNode::create(AudioContext* context, HTMLMediaElement* mediaElement)
 {
-    return adoptRef(new MediaElementAudioSourceNode(context, mediaElement));
+    return adoptRef(*new MediaElementAudioSourceNode(context, mediaElement));
 }
 
 MediaElementAudioSourceNode::MediaElementAudioSourceNode(AudioContext* context, HTMLMediaElement* mediaElement)
index 7f58ae7..f94a647 100644 (file)
@@ -41,7 +41,7 @@ class AudioContext;
     
 class MediaElementAudioSourceNode : public AudioNode, public AudioSourceProviderClient {
 public:
-    static PassRefPtr<MediaElementAudioSourceNode> create(AudioContext*, HTMLMediaElement*);
+    static Ref<MediaElementAudioSourceNode> create(AudioContext*, HTMLMediaElement*);
 
     virtual ~MediaElementAudioSourceNode();
 
index 0feb7c8..12101a4 100644 (file)
@@ -37,9 +37,9 @@
 
 namespace WebCore {
 
-PassRefPtr<MediaStreamAudioDestinationNode> MediaStreamAudioDestinationNode::create(AudioContext* context, size_t numberOfChannels)
+Ref<MediaStreamAudioDestinationNode> MediaStreamAudioDestinationNode::create(AudioContext* context, size_t numberOfChannels)
 {
-    return adoptRef(new MediaStreamAudioDestinationNode(context, numberOfChannels));
+    return adoptRef(*new MediaStreamAudioDestinationNode(context, numberOfChannels));
 }
 
 MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode(AudioContext* context, size_t numberOfChannels)
index 058d5a3..2f49161 100644 (file)
@@ -39,7 +39,7 @@ class MediaStreamAudioSource;
 
 class MediaStreamAudioDestinationNode : public AudioBasicInspectorNode {
 public:
-    static PassRefPtr<MediaStreamAudioDestinationNode> create(AudioContext*, size_t numberOfChannels);
+    static Ref<MediaStreamAudioDestinationNode> create(AudioContext*, size_t numberOfChannels);
 
     virtual ~MediaStreamAudioDestinationNode();
 
index 9545b7b..ed78a7c 100644 (file)
@@ -34,9 +34,9 @@
 
 namespace WebCore {
 
-RefPtr<MediaStreamAudioSource> MediaStreamAudioSource::create()
+Ref<MediaStreamAudioSource> MediaStreamAudioSource::create()
 {
-    return adoptRef(new MediaStreamAudioSource());
+    return adoptRef(*new MediaStreamAudioSource());
 }
 
 MediaStreamAudioSource::MediaStreamAudioSource()
index 947227f..418b32e 100644 (file)
@@ -42,7 +42,7 @@ class RealtimeMediaSourceCapabilities;
 
 class MediaStreamAudioSource : public RealtimeMediaSource {
 public:
-    static RefPtr<MediaStreamAudioSource> create();
+    static Ref<MediaStreamAudioSource> create();
 
     ~MediaStreamAudioSource() { }
 
index 867212e..d1abbc6 100644 (file)
@@ -35,9 +35,9 @@
 
 namespace WebCore {
 
-PassRefPtr<MediaStreamAudioSourceNode> MediaStreamAudioSourceNode::create(AudioContext* context, MediaStream* mediaStream, MediaStreamTrack* audioTrack, AudioSourceProvider* audioSourceProvider)
+Ref<MediaStreamAudioSourceNode> MediaStreamAudioSourceNode::create(AudioContext* context, MediaStream* mediaStream, MediaStreamTrack* audioTrack, AudioSourceProvider* audioSourceProvider)
 {
-    return adoptRef(new MediaStreamAudioSourceNode(context, mediaStream, audioTrack, audioSourceProvider));
+    return adoptRef(*new MediaStreamAudioSourceNode(context, mediaStream, audioTrack, audioSourceProvider));
 }
 
 MediaStreamAudioSourceNode::MediaStreamAudioSourceNode(AudioContext* context, MediaStream* mediaStream, MediaStreamTrack* audioTrack, AudioSourceProvider* audioSourceProvider)
index d29c903..1c6cdd9 100644 (file)
@@ -40,7 +40,7 @@ class AudioContext;
 
 class MediaStreamAudioSourceNode : public AudioNode, public AudioSourceProviderClient {
 public:
-    static PassRefPtr<MediaStreamAudioSourceNode> create(AudioContext*, MediaStream*, MediaStreamTrack*, AudioSourceProvider*);
+    static Ref<MediaStreamAudioSourceNode> create(AudioContext*, MediaStream*, MediaStreamTrack*, AudioSourceProvider*);
 
     virtual ~MediaStreamAudioSourceNode();
 
index a4ef9ca..99c93ad 100644 (file)
@@ -121,22 +121,22 @@ bool OscillatorNode::setType(unsigned type)
     switch (type) {
     case SINE:
         if (!s_periodicWaveSine)
-            s_periodicWaveSine = PeriodicWave::createSine(sampleRate).leakRef();
+            s_periodicWaveSine = &PeriodicWave::createSine(sampleRate).leakRef();
         periodicWave = s_periodicWaveSine;
         break;
     case SQUARE:
         if (!s_periodicWaveSquare)
-            s_periodicWaveSquare = PeriodicWave::createSquare(sampleRate).leakRef();
+            s_periodicWaveSquare = &PeriodicWave::createSquare(sampleRate).leakRef();
         periodicWave = s_periodicWaveSquare;
         break;
     case SAWTOOTH:
         if (!s_periodicWaveSawtooth)
-            s_periodicWaveSawtooth = PeriodicWave::createSawtooth(sampleRate).leakRef();
+            s_periodicWaveSawtooth = &PeriodicWave::createSawtooth(sampleRate).leakRef();
         periodicWave = s_periodicWaveSawtooth;
         break;
     case TRIANGLE:
         if (!s_periodicWaveTriangle)
-            s_periodicWaveTriangle = PeriodicWave::createTriangle(sampleRate).leakRef();
+            s_periodicWaveTriangle = &PeriodicWave::createTriangle(sampleRate).leakRef();
         periodicWave = s_periodicWaveTriangle;
         break;
     case CUSTOM:
index b2fa701..0cbd72e 100644 (file)
@@ -63,9 +63,9 @@ public:
         EXPONENTIAL_DISTANCE = 2,
     };
 
-    static PassRefPtr<PannerNode> create(AudioContext* context, float sampleRate)
+    static Ref<PannerNode> create(AudioContext* context, float sampleRate)
     {
-        return adoptRef(new PannerNode(context, sampleRate));
+        return adoptRef(*new PannerNode(context, sampleRate));
     }
 
     virtual ~PannerNode();
index a37d388..383af60 100644 (file)
@@ -45,7 +45,7 @@ namespace WebCore {
     
 using namespace VectorMath;
 
-PassRefPtr<PeriodicWave> PeriodicWave::create(float sampleRate, Float32Array* real, Float32Array* imag)
+RefPtr<PeriodicWave> PeriodicWave::create(float sampleRate, Float32Array* real, Float32Array* imag)
 {
     bool isGood = real && imag && real->length() == imag->length();
     ASSERT(isGood);
@@ -58,30 +58,30 @@ PassRefPtr<PeriodicWave> PeriodicWave::create(float sampleRate, Float32Array* re
     return nullptr;
 }
 
-PassRefPtr<PeriodicWave> PeriodicWave::createSine(float sampleRate)
+Ref<PeriodicWave> PeriodicWave::createSine(float sampleRate)
 {
-    RefPtr<PeriodicWave> waveTable = adoptRef(new PeriodicWave(sampleRate));
+    Ref<PeriodicWave> waveTable = adoptRef(*new PeriodicWave(sampleRate));
     waveTable->generateBasicWaveform(OscillatorNode::SINE);
     return waveTable;
 }
 
-PassRefPtr<PeriodicWave> PeriodicWave::createSquare(float sampleRate)
+Ref<PeriodicWave> PeriodicWave::createSquare(float sampleRate)
 {
-    RefPtr<PeriodicWave> waveTable = adoptRef(new PeriodicWave(sampleRate));
+    Ref<PeriodicWave> waveTable = adoptRef(*new PeriodicWave(sampleRate));
     waveTable->generateBasicWaveform(OscillatorNode::SQUARE);
     return waveTable;
 }
 
-PassRefPtr<PeriodicWave> PeriodicWave::createSawtooth(float sampleRate)
+Ref<PeriodicWave> PeriodicWave::createSawtooth(float sampleRate)
 {
-    RefPtr<PeriodicWave> waveTable = adoptRef(new PeriodicWave(sampleRate));
+    Ref<PeriodicWave> waveTable = adoptRef(*new PeriodicWave(sampleRate));
     waveTable->generateBasicWaveform(OscillatorNode::SAWTOOTH);
     return waveTable;
 }
 
-PassRefPtr<PeriodicWave> PeriodicWave::createTriangle(float sampleRate)
+Ref<PeriodicWave> PeriodicWave::createTriangle(float sampleRate)
 {
-    RefPtr<PeriodicWave> waveTable = adoptRef(new PeriodicWave(sampleRate));
+    Ref<PeriodicWave> waveTable = adoptRef(*new PeriodicWave(sampleRate));
     waveTable->generateBasicWaveform(OscillatorNode::TRIANGLE);
     return waveTable;
 }
index 85b6e1c..0b774a8 100644 (file)
@@ -41,13 +41,13 @@ namespace WebCore {
 
 class PeriodicWave : public RefCounted<PeriodicWave> {
 public:
-    static PassRefPtr<PeriodicWave> createSine(float sampleRate);
-    static PassRefPtr<PeriodicWave> createSquare(float sampleRate);
-    static PassRefPtr<PeriodicWave> createSawtooth(float sampleRate);
-    static PassRefPtr<PeriodicWave> createTriangle(float sampleRate);
+    static Ref<PeriodicWave> createSine(float sampleRate);
+    static Ref<PeriodicWave> createSquare(float sampleRate);
+    static Ref<PeriodicWave> createSawtooth(float sampleRate);
+    static Ref<PeriodicWave> createTriangle(float sampleRate);
 
     // Creates an arbitrary wave given the frequency components (Fourier coefficients).
-    static PassRefPtr<PeriodicWave> create(float sampleRate, Float32Array* real, Float32Array* imag);
+    static RefPtr<PeriodicWave> create(float sampleRate, Float32Array* real, Float32Array* imag);
 
     // Returns pointers to the lower and higher wave data for the pitch range containing
     // the given fundamental frequency. These two tables are in adjacent "pitch" ranges
index 90a6d17..25fbe34 100644 (file)
@@ -40,7 +40,7 @@
 
 namespace WebCore {
 
-PassRefPtr<ScriptProcessorNode> ScriptProcessorNode::create(AudioContext* context, float sampleRate, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChannels)
+RefPtr<ScriptProcessorNode> ScriptProcessorNode::create(AudioContext* context, float sampleRate, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChannels)
 {
     // Check for valid buffer size.
     switch (bufferSize) {
@@ -65,7 +65,7 @@ PassRefPtr<ScriptProcessorNode> ScriptProcessorNode::create(AudioContext* contex
     if (numberOfOutputChannels > AudioContext::maxNumberOfChannels())
         return nullptr;
 
-    return adoptRef(new ScriptProcessorNode(context, sampleRate, bufferSize, numberOfInputChannels, numberOfOutputChannels));
+    return adoptRef(*new ScriptProcessorNode(context, sampleRate, bufferSize, numberOfInputChannels, numberOfOutputChannels));
 }
 
 ScriptProcessorNode::ScriptProcessorNode(AudioContext* context, float sampleRate, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChannels)
index 2babf35..6a530d9 100644 (file)
@@ -53,7 +53,7 @@ public:
     // This value controls how frequently the onaudioprocess event handler is called and how many sample-frames need to be processed each call.
     // Lower numbers for bufferSize will result in a lower (better) latency. Higher numbers will be necessary to avoid audio breakup and glitches.
     // The value chosen must carefully balance between latency and audio quality.
-    static PassRefPtr<ScriptProcessorNode> create(AudioContext*, float sampleRate, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChannels);
+    static RefPtr<ScriptProcessorNode> create(AudioContext*, float sampleRate, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChannels);
 
     virtual ~ScriptProcessorNode();
 
index cb65372..8227975 100644 (file)
@@ -34,9 +34,9 @@ namespace WebCore {
     
 class WaveShaperNode : public AudioBasicProcessorNode {
 public:
-    static PassRefPtr<WaveShaperNode> create(AudioContext* context)
+    static Ref<WaveShaperNode> create(AudioContext* context)
     {
-        return adoptRef(new WaveShaperNode(context));
+        return adoptRef(*new WaveShaperNode(context));
     }
 
     // setCurve() is called on the main thread.