| Index: Source/core/html/track/InbandTextTrack.cpp
|
| diff --git a/Source/core/html/track/InbandTextTrack.cpp b/Source/core/html/track/InbandTextTrack.cpp
|
| index 1d5cbe37213f0f0a9376ec1d22de0e71bab7f858..ce05095498b06d1c88107405229a14f24e5e8af8 100644
|
| --- a/Source/core/html/track/InbandTextTrack.cpp
|
| +++ b/Source/core/html/track/InbandTextTrack.cpp
|
| @@ -27,6 +27,7 @@
|
| #include "core/html/track/InbandTextTrack.h"
|
|
|
| #include "bindings/v8/ExceptionStatePlaceholder.h"
|
| +#include "core/html/HTMLMediaElement.h"
|
| #include "core/html/track/vtt/VTTCue.h"
|
| #include "platform/Logging.h"
|
| #include "public/platform/WebInbandTextTrack.h"
|
| @@ -38,9 +39,9 @@ using blink::WebString;
|
|
|
| namespace WebCore {
|
|
|
| -PassRefPtr<InbandTextTrack> InbandTextTrack::create(Document& document, WebInbandTextTrack* webTrack)
|
| +PassRefPtrWillBeRawPtr<InbandTextTrack> InbandTextTrack::create(Document& document, WebInbandTextTrack* webTrack)
|
| {
|
| - return adoptRef(new InbandTextTrack(document, webTrack));
|
| + return adoptRefWillBeRefCountedGarbageCollected(new InbandTextTrack(document, webTrack));
|
| }
|
|
|
| InbandTextTrack::InbandTextTrack(Document& document, WebInbandTextTrack* webTrack)
|
| @@ -74,8 +75,13 @@ InbandTextTrack::InbandTextTrack(Document& document, WebInbandTextTrack* webTrac
|
|
|
| InbandTextTrack::~InbandTextTrack()
|
| {
|
| +#if ENABLE(OILPAN)
|
| + if (m_webTrack)
|
| + m_webTrack->setClient(0);
|
| +#else
|
| // Make sure m_webTrack was cleared by trackRemoved() before destruction.
|
| ASSERT(!m_webTrack);
|
| +#endif
|
| }
|
|
|
| size_t InbandTextTrack::inbandTrackIndex()
|
| @@ -97,7 +103,9 @@ void InbandTextTrack::setTrackList(TextTrackList* trackList)
|
|
|
| void InbandTextTrack::addWebVTTCue(double start, double end, const WebString& id, const WebString& content, const WebString& settings)
|
| {
|
| - RefPtr<VTTCue> cue = VTTCue::create(document(), start, end, content);
|
| + HTMLMediaElement* owner = mediaElement();
|
| + ASSERT(owner);
|
| + RefPtrWillBeRawPtr<VTTCue> cue = VTTCue::create(owner->document(), start, end, content);
|
| cue->setId(id);
|
| cue->parseSettings(settings);
|
| addCue(cue);
|
|
|