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

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 crbug.com/365260 crashing test + expectation 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
« no previous file with comments | « Source/core/html/track/InbandTextTrack.h ('k') | Source/core/html/track/LoadableTextTrack.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « Source/core/html/track/InbandTextTrack.h ('k') | Source/core/html/track/LoadableTextTrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698