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

Side by Side Diff: Source/modules/mediasource/SourceBuffer.cpp

Issue 262753004: Replace all remaining IDL finitude type checks with [TypeChecking=Unrestricted] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/track/vtt/VTTRegion.idl ('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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 { 237 {
238 // Section 3.1 appendWindowEnd attribute setter steps. 238 // Section 3.1 appendWindowEnd attribute setter steps.
239 // https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source. html#widl-SourceBuffer-appendWindowEnd 239 // https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source. html#widl-SourceBuffer-appendWindowEnd
240 // 1. If this object has been removed from the sourceBuffers attribute of th e parent media source then throw an 240 // 1. If this object has been removed from the sourceBuffers attribute of th e parent media source then throw an
241 // InvalidStateError exception and abort these steps. 241 // InvalidStateError exception and abort these steps.
242 // 2. If the updating attribute equals true, then throw an InvalidStateError exception and abort these steps. 242 // 2. If the updating attribute equals true, then throw an InvalidStateError exception and abort these steps.
243 if (throwExceptionIfRemovedOrUpdating(isRemoved(), m_updating, exceptionStat e)) 243 if (throwExceptionIfRemovedOrUpdating(isRemoved(), m_updating, exceptionStat e))
244 return; 244 return;
245 245
246 // 3. If the new value equals NaN, then throw an InvalidAccessError and abor t these steps. 246 // 3. If the new value equals NaN, then throw an InvalidAccessError and abor t these steps.
247 // 4. If the new value is less than or equal to appendWindowStart then throw an InvalidAccessError
248 // exception and abort these steps.
249 if (std::isnan(end)) { 247 if (std::isnan(end)) {
250 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages:: notAFiniteNumber(end)); 248 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages:: notAFiniteNumber(end));
251 return; 249 return;
252 } 250 }
251 // 4. If the new value is less than or equal to appendWindowStart then throw an InvalidAccessError
252 // exception and abort these steps.
253 if (end <= m_appendWindowStart) { 253 if (end <= m_appendWindowStart) {
254 // FIXME: Use ExceptionState::indexExceedsMinimumBound() once it lands. 254 // FIXME: Use ExceptionState::indexExceedsMinimumBound() once it lands.
255 exceptionState.throwDOMException(InvalidAccessError, "The value provided ('" + String::number(end) + "') is less than or equal to the minimum value (" + String::number(m_appendWindowStart) + ")."); 255 exceptionState.throwDOMException(InvalidAccessError, "The value provided ('" + String::number(end) + "') is less than or equal to the minimum value (" + String::number(m_appendWindowStart) + ").");
256 return; 256 return;
257 } 257 }
258 258
259 m_webSourceBuffer->setAppendWindowEnd(end); 259 m_webSourceBuffer->setAppendWindowEnd(end);
260 260
261 // 5. Update the attribute to the new value. 261 // 5. Update the attribute to the new value.
262 m_appendWindowEnd = end; 262 m_appendWindowEnd = end;
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 appendStreamDone(false); 698 appendStreamDone(false);
699 } 699 }
700 700
701 void SourceBuffer::trace(Visitor* visitor) 701 void SourceBuffer::trace(Visitor* visitor)
702 { 702 {
703 visitor->trace(m_source); 703 visitor->trace(m_source);
704 visitor->trace(m_stream); 704 visitor->trace(m_stream);
705 } 705 }
706 706
707 } // namespace WebCore 707 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/track/vtt/VTTRegion.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698