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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl

Issue 2761493002: [Bindings] Replace void cast with ALLOW_UNUSED_LOCAL in dictionary_v8.cpp.tmpl. (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {% filter format_blink_cpp_source_code %} 1 {% filter format_blink_cpp_source_code %}
2 2
3 {% from 'utilities.cpp.tmpl' import declare_enum_validation_variable %} 3 {% from 'utilities.cpp.tmpl' import declare_enum_validation_variable %}
4 {% include 'copyright_block.txt' %} 4 {% include 'copyright_block.txt' %}
5 #include "{{v8_original_class}}.h" 5 #include "{{v8_original_class}}.h"
6 6
7 {% for filename in cpp_includes if filename != '%s.h' % v8_class %} 7 {% for filename in cpp_includes if filename != '%s.h' % v8_class %}
8 #include "{{filename}}" 8 #include "{{filename}}"
9 {% endfor %} 9 {% endfor %}
10 10
(...skipping 10 matching lines...) Expand all
21 if (!v8Value->IsObject()) { 21 if (!v8Value->IsObject()) {
22 {% if use_permissive_dictionary_conversion %} 22 {% if use_permissive_dictionary_conversion %}
23 // Do nothing. 23 // Do nothing.
24 return; 24 return;
25 {% else %} 25 {% else %}
26 exceptionState.throwTypeError("cannot convert to dictionary."); 26 exceptionState.throwTypeError("cannot convert to dictionary.");
27 return; 27 return;
28 {% endif %} 28 {% endif %}
29 } 29 }
30 v8::Local<v8::Object> v8Object = v8Value.As<v8::Object>(); 30 v8::Local<v8::Object> v8Object = v8Value.As<v8::Object>();
31 (void)v8Object; 31 ALLOW_UNUSED_LOCAL(v8Object);
32 32
33 {% if parent_v8_class %} 33 {% if parent_v8_class %}
34 {{parent_v8_class}}::toImpl(isolate, v8Value, impl, exceptionState); 34 {{parent_v8_class}}::toImpl(isolate, v8Value, impl, exceptionState);
35 if (exceptionState.hadException()) 35 if (exceptionState.hadException())
36 return; 36 return;
37 37
38 {% endif %} 38 {% endif %}
39 {# Declare local variables only when the dictionary has members to avoid unuse d variable warnings. #} 39 {# Declare local variables only when the dictionary has members to avoid unuse d variable warnings. #}
40 {% if members %} 40 {% if members %}
41 v8::TryCatch block(isolate); 41 v8::TryCatch block(isolate);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 {{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate , v8::Local<v8::Value> value, ExceptionState& exceptionState) { 127 {{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate , v8::Local<v8::Value> value, ExceptionState& exceptionState) {
128 {{cpp_class}} impl; 128 {{cpp_class}} impl;
129 {{v8_class}}::toImpl(isolate, value, impl, exceptionState); 129 {{v8_class}}::toImpl(isolate, value, impl, exceptionState);
130 return impl; 130 return impl;
131 } 131 }
132 132
133 } // namespace blink 133 } // namespace blink
134 134
135 {% endfilter %}{# format_blink_cpp_source_code #} 135 {% endfilter %}{# format_blink_cpp_source_code #}
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698