Index: Source/core/html/HTMLInputElement.cpp |
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp |
index 80cda11bbe2e11fa7bf55f2af3aa5c9d85a2d3da..6e6a03f6b0d66043b0cd4a0a2032c16aff471547 100644 |
--- a/Source/core/html/HTMLInputElement.cpp |
+++ b/Source/core/html/HTMLInputElement.cpp |
@@ -1055,8 +1055,8 @@ double HTMLInputElement::valueAsNumber() const |
void HTMLInputElement::setValueAsNumber(double newValue, ExceptionState& exceptionState, TextFieldEventBehavior eventBehavior) |
{ |
- if (!std::isfinite(newValue)) { |
- exceptionState.throwDOMException(NotSupportedError, ExceptionMessages::notAFiniteNumber(newValue)); |
+ if (std::isinf(newValue)) { |
+ exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(newValue)); |
return; |
} |
m_inputType->setValueAsDouble(newValue, eventBehavior, exceptionState); |