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

Unified Diff: Source/core/html/forms/NumberInputType.cpp

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/forms/InputType.cpp ('k') | Source/core/html/track/TextTrack.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/NumberInputType.cpp
diff --git a/Source/core/html/forms/NumberInputType.cpp b/Source/core/html/forms/NumberInputType.cpp
index 3c7414859306b3187e529156e27fd95e9a8aae99..d4fde9934df7563fbee587db1800bde12f59d7ae 100644
--- a/Source/core/html/forms/NumberInputType.cpp
+++ b/Source/core/html/forms/NumberInputType.cpp
@@ -127,11 +127,11 @@ void NumberInputType::setValueAsDouble(double newValue, TextFieldEventBehavior e
// FIXME: We should use numeric_limits<double>::max for number input type.
const double floatMax = numeric_limits<float>::max();
if (newValue < -floatMax) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return;
}
if (newValue > floatMax) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return;
}
element()->setValue(serializeForNumberType(newValue), eventBehavior);
@@ -142,11 +142,11 @@ void NumberInputType::setValueAsDecimal(const Decimal& newValue, TextFieldEventB
// FIXME: We should use numeric_limits<double>::max for number input type.
const Decimal floatMax = Decimal::fromDouble(numeric_limits<float>::max());
if (newValue < -floatMax) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return;
}
if (newValue > floatMax) {
- es.throwDOMException(InvalidStateError);
+ es.throwUninformativeAndGenericDOMException(InvalidStateError);
return;
}
element()->setValue(serializeForNumberType(newValue), eventBehavior);
« no previous file with comments | « Source/core/html/forms/InputType.cpp ('k') | Source/core/html/track/TextTrack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698