Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / modules / mediasource / SourceBufferList.cpp
index 6c07335..f6be0f6 100644 (file)
 #include "config.h"
 #include "modules/mediasource/SourceBufferList.h"
 
-#include "core/events/Event.h"
 #include "core/events/GenericEventQueue.h"
+#include "modules/EventModules.h"
 #include "modules/mediasource/SourceBuffer.h"
 
-namespace WebCore {
-
-DEFINE_GC_INFO(SourceBufferList);
+namespace blink {
 
 SourceBufferList::SourceBufferList(ExecutionContext* context, GenericEventQueue* asyncEventQueue)
     : m_executionContext(context)
@@ -48,10 +46,12 @@ SourceBufferList::SourceBufferList(ExecutionContext* context, GenericEventQueue*
 
 SourceBufferList::~SourceBufferList()
 {
+#if !ENABLE(OILPAN)
     ASSERT(m_list.isEmpty());
+#endif
 }
 
-void SourceBufferList::add(PassRefPtrWillBeRawPtr<SourceBuffer> buffer)
+void SourceBufferList::add(SourceBuffer* buffer)
 {
     m_list.append(buffer);
     scheduleEvent(EventTypeNames::addsourcebuffer);
@@ -76,7 +76,7 @@ void SourceBufferList::scheduleEvent(const AtomicString& eventName)
 {
     ASSERT(m_asyncEventQueue);
 
-    RefPtr<Event> event = Event::create(eventName);
+    RefPtrWillBeRawPtr<Event> event = Event::create(eventName);
     event->setTarget(this);
 
     m_asyncEventQueue->enqueueEvent(event.release());
@@ -95,6 +95,7 @@ ExecutionContext* SourceBufferList::executionContext() const
 void SourceBufferList::trace(Visitor* visitor)
 {
     visitor->trace(m_list);
+    EventTargetWithInlineData::trace(visitor);
 }
 
-} // namespace WebCore
+} // namespace blink