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

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

Issue 131483008: Correctly report TypeError for HTML{Meter,Progress}Element setters. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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
Index: Source/core/html/HTMLMeterElement.cpp
diff --git a/Source/core/html/HTMLMeterElement.cpp b/Source/core/html/HTMLMeterElement.cpp
index 41e536d9944c19eaa4401b19c54991068326f3b7..aabfb4264306630d37e0e22203f9714198c51023 100644
--- a/Source/core/html/HTMLMeterElement.cpp
+++ b/Source/core/html/HTMLMeterElement.cpp
@@ -78,7 +78,7 @@ double HTMLMeterElement::min() const
void HTMLMeterElement::setMin(double min, ExceptionState& exceptionState)
{
if (!std::isfinite(min)) {
- exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::notAFiniteNumber(min));
+ exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(min));
return;
}
setFloatingPointAttribute(minAttr, min);
@@ -92,7 +92,7 @@ double HTMLMeterElement::max() const
void HTMLMeterElement::setMax(double max, ExceptionState& exceptionState)
{
if (!std::isfinite(max)) {
- exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::notAFiniteNumber(max));
+ exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(max));
return;
}
setFloatingPointAttribute(maxAttr, max);
@@ -107,7 +107,7 @@ double HTMLMeterElement::value() const
void HTMLMeterElement::setValue(double value, ExceptionState& exceptionState)
{
if (!std::isfinite(value)) {
- exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::notAFiniteNumber(value));
+ exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(value));
return;
}
setFloatingPointAttribute(valueAttr, value);
@@ -122,7 +122,7 @@ double HTMLMeterElement::low() const
void HTMLMeterElement::setLow(double low, ExceptionState& exceptionState)
{
if (!std::isfinite(low)) {
- exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::notAFiniteNumber(low));
+ exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(low));
return;
}
setFloatingPointAttribute(lowAttr, low);
@@ -137,7 +137,7 @@ double HTMLMeterElement::high() const
void HTMLMeterElement::setHigh(double high, ExceptionState& exceptionState)
{
if (!std::isfinite(high)) {
- exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::notAFiniteNumber(high));
+ exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(high));
return;
}
setFloatingPointAttribute(highAttr, high);
@@ -152,7 +152,7 @@ double HTMLMeterElement::optimum() const
void HTMLMeterElement::setOptimum(double optimum, ExceptionState& exceptionState)
{
if (!std::isfinite(optimum)) {
- exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::notAFiniteNumber(optimum));
+ exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(optimum));
return;
}
setFloatingPointAttribute(optimumAttr, optimum);

Powered by Google App Engine
This is Rietveld 408576698