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

Unified Diff: Source/modules/mediasource/MediaSource.cpp

Issue 1306613002: Keep auxilliary media objects on the heap always. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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/modules/mediasource/MediaSource.h ('k') | Source/modules/mediasource/SourceBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediasource/MediaSource.cpp
diff --git a/Source/modules/mediasource/MediaSource.cpp b/Source/modules/mediasource/MediaSource.cpp
index 1cdd99e100834026fb2a287e906edaa27493040c..361ac795255d36dffb89bd9b879e08b929c86e7c 100644
--- a/Source/modules/mediasource/MediaSource.cpp
+++ b/Source/modules/mediasource/MediaSource.cpp
@@ -300,11 +300,11 @@ double MediaSource::duration() const
return isClosed() ? std::numeric_limits<float>::quiet_NaN() : m_webMediaSource->duration();
}
-PassRefPtrWillBeRawPtr<TimeRanges> MediaSource::buffered() const
+TimeRanges* MediaSource::buffered() const
{
// Implements MediaSource algorithm for HTMLMediaElement.buffered.
// https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#htmlmediaelement-extensions
- WillBeHeapVector<RefPtrWillBeMember<TimeRanges>> ranges(m_activeSourceBuffers->length());
+ HeapVector<Member<TimeRanges>> ranges(m_activeSourceBuffers->length());
for (size_t i = 0; i < m_activeSourceBuffers->length(); ++i)
ranges[i] = m_activeSourceBuffers->item(i)->buffered(ASSERT_NO_EXCEPTION);
@@ -326,7 +326,7 @@ PassRefPtrWillBeRawPtr<TimeRanges> MediaSource::buffered() const
return TimeRanges::create();
// 4. Let intersection ranges equal a TimeRange object containing a single range from 0 to highest end time.
- RefPtrWillBeRawPtr<TimeRanges> intersectionRanges = TimeRanges::create(0, highestEndTime);
+ TimeRanges* intersectionRanges = TimeRanges::create(0, highestEndTime);
// 5. For each SourceBuffer object in activeSourceBuffers run the following steps:
bool ended = readyState() == endedKeyword();
@@ -343,10 +343,10 @@ PassRefPtrWillBeRawPtr<TimeRanges> MediaSource::buffered() const
intersectionRanges->intersectWith(sourceRanges);
}
- return intersectionRanges.release();
+ return intersectionRanges;
}
-PassRefPtrWillBeRawPtr<TimeRanges> MediaSource::seekable() const
+TimeRanges* MediaSource::seekable() const
{
// Implements MediaSource algorithm for HTMLMediaElement.seekable.
// https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#htmlmediaelement-extensions
@@ -358,7 +358,7 @@ PassRefPtrWillBeRawPtr<TimeRanges> MediaSource::seekable() const
// If duration equals positive Infinity:
if (sourceDuration == std::numeric_limits<double>::infinity()) {
- RefPtrWillBeRawPtr<TimeRanges> buffered = m_attachedElement->buffered();
+ TimeRanges* buffered = m_attachedElement->buffered();
// 1. If the HTMLMediaElement.buffered attribute returns an empty TimeRanges object, then
// return an empty TimeRanges object and abort these steps.
« no previous file with comments | « Source/modules/mediasource/MediaSource.h ('k') | Source/modules/mediasource/SourceBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698