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

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

Issue 724733002: Support for [Clamp] and [EnforceRange] to IDL dictionary. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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/bindings/scripts/v8_types.py ('k') | Source/bindings/tests/results/core/V8TestDictionary.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/dictionary_v8.cpp
diff --git a/Source/bindings/templates/dictionary_v8.cpp b/Source/bindings/templates/dictionary_v8.cpp
index 438268b6d4edece589712b62d1dbc5e3d3635d79..a5a47a2324c9236e03a5b3c04e90a32d899dc043 100644
--- a/Source/bindings/templates/dictionary_v8.cpp
+++ b/Source/bindings/templates/dictionary_v8.cpp
@@ -29,8 +29,9 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Handle<v8::Value> v8Value, {
// Dictionary/DictionaryHelper to something that uses ExceptionState.
v8::TryCatch block;
bashi 2014/11/17 02:20:45 I think you can fix this FIXME in this CL or a fol
zino 2014/11/19 18:12:19 I'm trying to fix this but I'm not familiar with t
bashi 2014/11/20 02:18:02 Hmm, let me investigate it later. I think I can fi
{% for member in members %}
- {{member.cpp_type}} {{member.name}};
- if (DictionaryHelper::getWithUndefinedOrNullCheck(dictionary, "{{member.name}}", {{member.name}})) {
+ v8::Local<v8::Value> {{member.name}}Value;
+ if (dictionary.getKey("{{member.name}}", {{member.name}}Value) && !isUndefinedOrNull({{member.name}}Value)) {
haraken 2014/11/17 00:22:19 Is getWithUndefinedOrNullCheck still needed? It's
bashi 2014/11/17 02:20:45 Also, we can remove Dictionary here if you use v8_
zino 2014/11/19 18:12:19 Done.
+ {{member.v8_value_to_local_cpp_value}};
{% if member.enum_validation_expression %}
String string = {{member.name}};
if (!({{member.enum_validation_expression}})) {
« no previous file with comments | « Source/bindings/scripts/v8_types.py ('k') | Source/bindings/tests/results/core/V8TestDictionary.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698