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

Side by Side Diff: Source/bindings/templates/methods.cpp

Issue 384773004: IDL clean-up: Rename is_nullable_simple => is_implicit_nullable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-nullable-method-return-type
Patch Set: order, order Created 6 years, 5 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 | « Source/bindings/templates/attributes.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {##############################################################################} 1 {##############################################################################}
2 {% macro generate_method(method, world_suffix) %} 2 {% macro generate_method(method, world_suffix) %}
3 {% filter conditional(method.conditional_string) %} 3 {% filter conditional(method.conditional_string) %}
4 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info) 4 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info)
5 { 5 {
6 {# Local variables #} 6 {# Local variables #}
7 {% if method.has_exception_state %} 7 {% if method.has_exception_state %}
8 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{method.na me}}", "{{interface_name}}", info.Holder(), info.GetIsolate()); 8 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{method.na me}}", "{{interface_name}}", info.Holder(), info.GetIsolate());
9 {% endif %} 9 {% endif %}
10 {# Overloaded methods have length checked during overload resolution #} 10 {# Overloaded methods have length checked during overload resolution #}
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 {{throw_from_exception_state(method)}}; 261 {{throw_from_exception_state(method)}};
262 return; 262 return;
263 } 263 }
264 {% endif %} 264 {% endif %}
265 {# Set return value #} 265 {# Set return value #}
266 {% if method.is_constructor %} 266 {% if method.is_constructor %}
267 {{generate_constructor_wrapper(method)}} 267 {{generate_constructor_wrapper(method)}}
268 {%- elif method.union_arguments %} 268 {%- elif method.union_arguments %}
269 {{union_type_method_call_and_set_return_value(method)}} 269 {{union_type_method_call_and_set_return_value(method)}}
270 {%- elif v8_set_return_value %} 270 {%- elif v8_set_return_value %}
271 {% if method.is_nullable %} 271 {% if method.is_explicit_nullable %}
272 if (result.isNull()) 272 if (result.isNull())
273 v8SetReturnValueNull(info); 273 v8SetReturnValueNull(info);
274 else 274 else
275 {{v8_set_return_value}}; 275 {{v8_set_return_value}};
276 {% else %} 276 {% else %}
277 {{v8_set_return_value}}; 277 {{v8_set_return_value}};
278 {% endif %} 278 {% endif %}
279 {%- endif %}{# None for void #} 279 {%- endif %}{# None for void #}
280 {# Post-set #} 280 {# Post-set #}
281 {% if interface_name == 'EventTarget' and method.name in ('addEventListener', 281 {% if interface_name == 'EventTarget' and method.name in ('addEventListener',
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), isolate); 591 v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), isolate);
592 {% else %} 592 {% else %}
593 {% set constructor_class = v8_class + ('Constructor' 593 {% set constructor_class = v8_class + ('Constructor'
594 if constructor.is_named_constructor else 594 if constructor.is_named_constructor else
595 '') %} 595 '') %}
596 v8::Handle<v8::Object> wrapper = info.Holder(); 596 v8::Handle<v8::Object> wrapper = info.Holder();
597 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{constr uctor_class}}::wrapperTypeInfo, wrapper, isolate, {{wrapper_configuration}}); 597 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{constr uctor_class}}::wrapperTypeInfo, wrapper, isolate, {{wrapper_configuration}});
598 {% endif %} 598 {% endif %}
599 v8SetReturnValue(info, wrapper); 599 v8SetReturnValue(info, wrapper);
600 {% endmacro %} 600 {% endmacro %}
OLDNEW
« no previous file with comments | « Source/bindings/templates/attributes.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698