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

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

Issue 99083002: WIP: Migrate generated bindings to new ExceptionState constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 7 years 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/canvas/WebGLRenderingContext.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 cda3aff403b12bc7f44d5d7bf5f5fdee6ef0ae4c..2466ec488bb250925ea9d9f9f16ad473730f4a0f 100644
--- a/Source/core/html/forms/NumberInputType.cpp
+++ b/Source/core/html/forms/NumberInputType.cpp
@@ -34,7 +34,6 @@
#include "HTMLNames.h"
#include "InputTypeNames.h"
-#include "bindings/v8/ExceptionMessages.h"
#include "bindings/v8/ExceptionState.h"
#include "core/dom/ExceptionCode.h"
#include "core/events/KeyboardEvent.h"
@@ -127,7 +126,7 @@ 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 || newValue > floatMax) {
- exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::failedToSet("valueAsNumber", "HTMLInputElement", "The value provided (" + String::number(newValue) + ") is outside the range (" + String::number(-floatMax) + ", " + String::number(floatMax) + ")."));
+ exceptionState.throwDOMException(InvalidStateError, "The value provided (" + String::number(newValue) + ") is outside the range (" + String::number(-floatMax) + ", " + String::number(floatMax) + ").");
return;
}
element().setValue(serializeForNumberType(newValue), eventBehavior);
@@ -138,7 +137,7 @@ 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 || newValue > floatMax) {
- exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::failedToSet("valueAsNumber", "HTMLInputElement", "The value provided (" + newValue.toString() + ") is outside the range (-" + floatMax.toString() + ", " + floatMax.toString() + ")."));
+ exceptionState.throwDOMException(InvalidStateError, "The value provided (" + newValue.toString() + ") is outside the range (-" + floatMax.toString() + ", " + floatMax.toString() + ").");
return;
}
element().setValue(serializeForNumberType(newValue), eventBehavior);
« no previous file with comments | « Source/core/html/canvas/WebGLRenderingContext.cpp ('k') | Source/core/html/track/TextTrack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698