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

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

Issue 265753003: Add support for type checking of floating point attributes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove nop [TypeChecking=Unrestricted] 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/bindings/tests/results/V8TestInterface.cpp ('k') | Source/modules/mediasource/SourceBuffer.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediasource/SourceBuffer.cpp
diff --git a/Source/modules/mediasource/SourceBuffer.cpp b/Source/modules/mediasource/SourceBuffer.cpp
index 026e9da91d01317c0a67d3ec9d32831b4cff76b0..cfbd6c09d7a709f1ce774f1bbb73d16aa6e122e4 100644
--- a/Source/modules/mediasource/SourceBuffer.cpp
+++ b/Source/modules/mediasource/SourceBuffer.cpp
@@ -175,13 +175,8 @@ double SourceBuffer::timestampOffset() const
void SourceBuffer::setTimestampOffset(double offset, ExceptionState& exceptionState)
{
- // Enforce throwing an exception on restricted double values.
- if (!std::isfinite(offset)) {
- exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(offset));
- return;
- }
-
// Section 3.1 timestampOffset attribute setter steps.
+ // https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#widl-SourceBuffer-timestampOffset
// 1. Let new timestamp offset equal the new value being assigned to this attribute.
// 2. If this object has been removed from the sourceBuffers attribute of the parent media source, then throw an
// InvalidStateError exception and abort these steps.
@@ -212,13 +207,8 @@ double SourceBuffer::appendWindowStart() const
void SourceBuffer::setAppendWindowStart(double start, ExceptionState& exceptionState)
{
- // Enforce throwing an exception on restricted double values.
- if (!std::isfinite(start)) {
- exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(start));
- return;
- }
-
// Section 3.1 appendWindowStart attribute setter steps.
+ // https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#widl-SourceBuffer-appendWindowStart
// 1. If this object has been removed from the sourceBuffers attribute of the parent media source then throw an
// InvalidStateError exception and abort these steps.
// 2. If the updating attribute equals true, then throw an InvalidStateError exception and abort these steps.
@@ -246,6 +236,7 @@ double SourceBuffer::appendWindowEnd() const
void SourceBuffer::setAppendWindowEnd(double end, ExceptionState& exceptionState)
{
// Section 3.1 appendWindowEnd attribute setter steps.
+ // https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#widl-SourceBuffer-appendWindowEnd
// 1. If this object has been removed from the sourceBuffers attribute of the parent media source then throw an
// InvalidStateError exception and abort these steps.
// 2. If the updating attribute equals true, then throw an InvalidStateError exception and abort these steps.
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.cpp ('k') | Source/modules/mediasource/SourceBuffer.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698