| Index: Source/modules/mediasource/MediaSource.cpp
|
| diff --git a/Source/modules/mediasource/MediaSource.cpp b/Source/modules/mediasource/MediaSource.cpp
|
| index 9dc2ff704c43fcc5da84299cfd37548e43f3b953..3ac5fa4afe25e6561e7abb0744916248691055ed 100644
|
| --- a/Source/modules/mediasource/MediaSource.cpp
|
| +++ b/Source/modules/mediasource/MediaSource.cpp
|
| @@ -87,11 +87,11 @@ const AtomicString& MediaSource::endedKeyword()
|
| return ended;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<MediaSource> MediaSource::create(ExecutionContext* context)
|
| +MediaSource* MediaSource::create(ExecutionContext* context)
|
| {
|
| - RefPtrWillBeRawPtr<MediaSource> mediaSource(adoptRefWillBeRefCountedGarbageCollected(new MediaSource(context)));
|
| + MediaSource* mediaSource(adoptRefCountedGarbageCollected(new MediaSource(context)));
|
| mediaSource->suspendIfNeeded();
|
| - return mediaSource.release();
|
| + return mediaSource;
|
| }
|
|
|
| MediaSource::MediaSource(ExecutionContext* context)
|
| @@ -150,18 +150,17 @@ SourceBuffer* MediaSource::addSourceBuffer(const String& type, ExceptionState& e
|
| return 0;
|
| }
|
|
|
| - RefPtrWillBeRawPtr<SourceBuffer> buffer = SourceBuffer::create(webSourceBuffer.release(), this, m_asyncEventQueue.get());
|
| + SourceBuffer* buffer = SourceBuffer::create(webSourceBuffer.release(), this, m_asyncEventQueue.get());
|
| // 6. Add the new object to sourceBuffers and fire a addsourcebuffer on that object.
|
| m_sourceBuffers->add(buffer);
|
| m_activeSourceBuffers->add(buffer);
|
| // 7. Return the new object to the caller.
|
| - return buffer.get();
|
| + return buffer;
|
| }
|
|
|
| void MediaSource::removeSourceBuffer(SourceBuffer* buffer, ExceptionState& exceptionState)
|
| {
|
| WTF_LOG(Media, "MediaSource::removeSourceBuffer() %p", this);
|
| - RefPtr<SourceBuffer> protect(buffer);
|
|
|
| // 2.2 https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-MediaSource-removeSourceBuffer-void-SourceBuffer-sourceBuffer
|
|
|
| @@ -260,7 +259,9 @@ ExecutionContext* MediaSource::executionContext() const
|
|
|
| void MediaSource::trace(Visitor* visitor)
|
| {
|
| +#if ENABLE(OILPAN)
|
| visitor->trace(m_asyncEventQueue);
|
| +#endif
|
| visitor->trace(m_sourceBuffers);
|
| visitor->trace(m_activeSourceBuffers);
|
| EventTargetWithInlineData::trace(visitor);
|
|
|