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

Unified Diff: Source/bindings/templates/attributes.cpp

Issue 860353002: IDL: Add toRestricted{Float,Double}() helpers to V8Binding.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add FIXME comment Created 5 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/bindings/templates/attributes.cpp
diff --git a/Source/bindings/templates/attributes.cpp b/Source/bindings/templates/attributes.cpp
index 0a627881244a3e6fd9919ff707f22e43ac7988d3..f7bc807acd6fcd53e79afed39c967926936fb1f9 100644
--- a/Source/bindings/templates/attributes.cpp
+++ b/Source/bindings/templates/attributes.cpp
@@ -241,16 +241,7 @@ v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
{% endif %}
{# Type checking, possibly throw a TypeError, per:
http://www.w3.org/TR/WebIDL/#es-type-mapping #}
- {% if attribute.has_type_checking_unrestricted %}
- {# Non-finite floating point values (NaN, +Infinity or −Infinity), per:
- http://heycam.github.io/webidl/#es-float
- http://heycam.github.io/webidl/#es-double #}
- if (!std::isfinite(cppValue)) {
- exceptionState.throwTypeError("The provided {{attribute.idl_type}} value is non-finite.");
- exceptionState.throwIfNeeded();
- return;
- }
- {% elif attribute.has_type_checking_interface %}
+ {% if attribute.has_type_checking_interface %}
{# Type checking for interface types (if interface not implemented, throw
TypeError), per http://www.w3.org/TR/WebIDL/#es-interface #}
if (!cppValue{% if attribute.is_nullable %} && !isUndefinedOrNull(v8Value){% endif %}) {

Powered by Google App Engine
This is Rietveld 408576698