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

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

Issue 871013007: Use enum BinaryType for WebSocket.binaryType, instead of DOMString (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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..6bf1e0addf49457b03294b32777d928c5439228f 100644
--- a/Source/bindings/templates/attributes.cpp
+++ b/Source/bindings/templates/attributes.cpp
@@ -262,8 +262,10 @@ v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
{# Setter ignores invalid enum values:
http://www.w3.org/TR/WebIDL/#idl-enums #}
String string = cppValue;
- if (!({{attribute.enum_validation_expression}}))
+ if (!({{attribute.enum_validation_expression}})) {
+ currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, "The provided value '"+string+"' is not a valid value of type '{{attribute.idl_type}}'."));
Nils Barth (inactive) 2015/02/11 18:58:45 Could you do this in a separate CL, since it affec
return;
+ }
{% endif %}
{# Pre-set context #}
{% if attribute.is_custom_element_callbacks or

Powered by Google App Engine
This is Rietveld 408576698