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

Side by Side Diff: Source/modules/mediasource/SourceBuffer.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 unified diff | Download patch
« no previous file with comments | « Source/modules/mediasource/SourceBuffer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 appendMode = WebSourceBuffer::AppendModeSequence; 152 appendMode = WebSourceBuffer::AppendModeSequence;
153 if (!m_webSourceBuffer->setMode(appendMode)) { 153 if (!m_webSourceBuffer->setMode(appendMode)) {
154 exceptionState.throwDOMException(InvalidStateError, "The mode may not be set while the SourceBuffer's append state is 'PARSING_MEDIA_SEGMENT'."); 154 exceptionState.throwDOMException(InvalidStateError, "The mode may not be set while the SourceBuffer's append state is 'PARSING_MEDIA_SEGMENT'.");
155 return; 155 return;
156 } 156 }
157 157
158 // 7. Update the attribute to new mode. 158 // 7. Update the attribute to new mode.
159 m_mode = newMode; 159 m_mode = newMode;
160 } 160 }
161 161
162 PassRefPtrWillBeRawPtr<TimeRanges> SourceBuffer::buffered(ExceptionState& except ionState) const 162 TimeRanges* SourceBuffer::buffered(ExceptionState& exceptionState) const
163 { 163 {
164 // Section 3.1 buffered attribute steps. 164 // Section 3.1 buffered attribute steps.
165 // 1. If this object has been removed from the sourceBuffers attribute of th e parent media source then throw an 165 // 1. If this object has been removed from the sourceBuffers attribute of th e parent media source then throw an
166 // InvalidStateError exception and abort these steps. 166 // InvalidStateError exception and abort these steps.
167 if (isRemoved()) { 167 if (isRemoved()) {
168 exceptionState.throwDOMException(InvalidStateError, "This SourceBuffer h as been removed from the parent media source."); 168 exceptionState.throwDOMException(InvalidStateError, "This SourceBuffer h as been removed from the parent media source.");
169 return nullptr; 169 return nullptr;
170 } 170 }
171 171
172 // 2. Return a new static normalized TimeRanges object for the media segment s buffered. 172 // 2. Return a new static normalized TimeRanges object for the media segment s buffered.
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 { 763 {
764 visitor->trace(m_source); 764 visitor->trace(m_source);
765 visitor->trace(m_stream); 765 visitor->trace(m_stream);
766 visitor->trace(m_trackDefaults); 766 visitor->trace(m_trackDefaults);
767 visitor->trace(m_asyncEventQueue); 767 visitor->trace(m_asyncEventQueue);
768 RefCountedGarbageCollectedEventTargetWithInlineData<SourceBuffer>::trace(vis itor); 768 RefCountedGarbageCollectedEventTargetWithInlineData<SourceBuffer>::trace(vis itor);
769 ActiveDOMObject::trace(visitor); 769 ActiveDOMObject::trace(visitor);
770 } 770 }
771 771
772 } // namespace blink 772 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/mediasource/SourceBuffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698