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

Unified Diff: Source/core/html/TimeRanges.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/core/html/TimeRanges.h ('k') | Source/core/html/TimeRanges.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/TimeRanges.cpp
diff --git a/Source/core/html/TimeRanges.cpp b/Source/core/html/TimeRanges.cpp
index 25d35576e832d81128551dce4881ab24b865c047..ac9caa27d7b28e641bd1273887166a0cfe7674d3 100644
--- a/Source/core/html/TimeRanges.cpp
+++ b/Source/core/html/TimeRanges.cpp
@@ -39,31 +39,31 @@ TimeRanges::TimeRanges(double start, double end)
add(start, end);
}
-PassRefPtrWillBeRawPtr<TimeRanges> TimeRanges::create(const blink::WebTimeRanges& webRanges)
+TimeRanges* TimeRanges::create(const blink::WebTimeRanges& webRanges)
{
- RefPtrWillBeRawPtr<TimeRanges> ranges = TimeRanges::create();
+ TimeRanges* ranges = TimeRanges::create();
unsigned size = webRanges.size();
for (unsigned i = 0; i < size; ++i)
ranges->add(webRanges[i].start, webRanges[i].end);
- return ranges.release();
+ return ranges;
}
-PassRefPtrWillBeRawPtr<TimeRanges> TimeRanges::copy() const
+TimeRanges* TimeRanges::copy() const
{
- RefPtrWillBeRawPtr<TimeRanges> newSession = TimeRanges::create();
+ TimeRanges* newSession = TimeRanges::create();
unsigned size = m_ranges.size();
for (unsigned i = 0; i < size; i++)
newSession->add(m_ranges[i].m_start, m_ranges[i].m_end);
- return newSession.release();
+ return newSession;
}
void TimeRanges::invert()
{
- RefPtrWillBeRawPtr<TimeRanges> inverted = TimeRanges::create();
+ TimeRanges* inverted = TimeRanges::create();
double posInf = std::numeric_limits<double>::infinity();
double negInf = -std::numeric_limits<double>::infinity();
@@ -92,18 +92,18 @@ void TimeRanges::intersectWith(const TimeRanges* other)
if (other == this)
return;
- RefPtrWillBeRawPtr<TimeRanges> invertedOther = other->copy();
+ TimeRanges* invertedOther = other->copy();
invertedOther->invert();
invert();
- unionWith(invertedOther.get());
+ unionWith(invertedOther);
invert();
}
void TimeRanges::unionWith(const TimeRanges* other)
{
ASSERT(other);
- RefPtrWillBeRawPtr<TimeRanges> unioned = copy();
+ TimeRanges* unioned = copy();
for (size_t index = 0; index < other->m_ranges.size(); ++index) {
const Range& range = other->m_ranges[index];
unioned->add(range.m_start, range.m_end);
« no previous file with comments | « Source/core/html/TimeRanges.h ('k') | Source/core/html/TimeRanges.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698