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

Unified Diff: Source/core/html/MediaController.cpp

Issue 265743010: Use [TypeChecking=Unrestricted] for MediaController (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/core/html/MediaController.h ('k') | Source/core/html/MediaController.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/MediaController.cpp
diff --git a/Source/core/html/MediaController.cpp b/Source/core/html/MediaController.cpp
index bd8e259674dd1ef0330aa02e5e808c4c7ddd2592..8eae382b75edf706fb8d4122804243f1cf42b491 100644
--- a/Source/core/html/MediaController.cpp
+++ b/Source/core/html/MediaController.cpp
@@ -156,12 +156,6 @@ double MediaController::currentTime() const
void MediaController::setCurrentTime(double time, ExceptionState& exceptionState)
{
- // FIXME: generated bindings should check isfinite: http://crbug.com/354298
- if (!std::isfinite(time)) {
- exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(time));
- return;
- }
-
// When the user agent is to seek the media controller to a particular new playback position,
// it must follow these steps:
// If the new playback position is less than zero, then set it to zero.
@@ -221,14 +215,8 @@ void MediaController::pause()
reportControllerState();
}
-void MediaController::setDefaultPlaybackRate(double rate, ExceptionState& exceptionState)
+void MediaController::setDefaultPlaybackRate(double rate)
{
- // FIXME: generated bindings should check isfinite: http://crbug.com/354298
- if (!std::isfinite(rate)) {
- exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(rate));
- return;
- }
-
if (m_defaultPlaybackRate == rate)
return;
@@ -245,14 +233,8 @@ double MediaController::playbackRate() const
return m_clock->playRate();
}
-void MediaController::setPlaybackRate(double rate, ExceptionState& exceptionState)
+void MediaController::setPlaybackRate(double rate)
{
- // FIXME: generated bindings should check isfinite: http://crbug.com/354298
- if (!std::isfinite(rate)) {
- exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(rate));
- return;
- }
-
if (m_clock->playRate() == rate)
return;
@@ -269,12 +251,6 @@ void MediaController::setPlaybackRate(double rate, ExceptionState& exceptionStat
void MediaController::setVolume(double level, ExceptionState& exceptionState)
{
- // FIXME: generated bindings should check isfinite: http://crbug.com/354298
- if (!std::isfinite(level)) {
- exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(level));
- return;
- }
-
if (m_volume == level)
return;
« no previous file with comments | « Source/core/html/MediaController.h ('k') | Source/core/html/MediaController.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698