Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1018)

Unified Diff: Source/core/html/track/InbandTextTrack.cpp

Issue 244493002: Oilpan: add transition types to track interface objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing tracing to HTMLTrackElement. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..02ef12e04128b670a00364407e466ad6323a6f85 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,8 @@ InbandTextTrack::InbandTextTrack(Document& document, WebInbandTextTrack* webTrac
InbandTextTrack::~InbandTextTrack()
{
- // Make sure m_webTrack was cleared by trackRemoved() before destruction.
- ASSERT(!m_webTrack);
+ if (m_webTrack)
+ m_webTrack->setClient(0);
}
size_t InbandTextTrack::inbandTrackIndex()
@@ -97,7 +98,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);

Powered by Google App Engine
This is Rietveld 408576698