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

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

Issue 1238083002: Oilpan: Move the EventListener hierarchy to Oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | Annotate | Revision Log
OLDNEW
1 {% from 'conversions.cpp' import declare_enum_validation_variable, v8_value_to_l ocal_cpp_value %} 1 {% from 'conversions.cpp' import declare_enum_validation_variable, v8_value_to_l ocal_cpp_value %}
2 2
3 3
4 {##############################################################################} 4 {##############################################################################}
5 {% macro generate_method(method, world_suffix) %} 5 {% macro generate_method(method, world_suffix) %}
6 {% filter conditional(method.conditional_string) %} 6 {% filter conditional(method.conditional_string) %}
7 {% if method.returns_promise and method.has_exception_state %} 7 {% if method.returns_promise and method.has_exception_state %}
8 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}Promis e(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionStat e) 8 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}Promis e(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionStat e)
9 {% else %} 9 {% else %}
10 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info) 10 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info)
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 {% endif %} 88 {% endif %}
89 {% endfor %} 89 {% endfor %}
90 } 90 }
91 {% endmacro %} 91 {% endmacro %}
92 92
93 93
94 {######################################} 94 {######################################}
95 {% macro generate_argument_var_declaration(argument) %} 95 {% macro generate_argument_var_declaration(argument) %}
96 {# FIXME: remove EventListener special case #} 96 {# FIXME: remove EventListener special case #}
97 {% if argument.idl_type == 'EventListener' %} 97 {% if argument.idl_type == 'EventListener' %}
98 RefPtr<{{argument.idl_type}}> {{argument.name}} 98 RefPtrWillBeRawPtr<{{argument.idl_type}}> {{argument.name}}
99 {%- else %} 99 {%- else %}
100 {{argument.cpp_type}} {{argument.name}} 100 {{argument.cpp_type}} {{argument.name}}
101 {%- endif %}{# argument.idl_type == 'EventListener' #} 101 {%- endif %}{# argument.idl_type == 'EventListener' #}
102 {% endmacro %} 102 {% endmacro %}
103 103
104 104
105 {######################################} 105 {######################################}
106 {% macro generate_argument(method, argument, world_suffix) %} 106 {% macro generate_argument(method, argument, world_suffix) %}
107 {% if argument.is_optional and not argument.has_default and 107 {% if argument.is_optional and not argument.has_default and
108 not argument.is_dictionary and 108 not argument.is_dictionary and
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 if method.overloads else 693 if method.overloads else
694 method.runtime_enabled_function) %} 694 method.runtime_enabled_function) %}
695 v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate::New(iso late, {{cpp_class_or_partial}}V8Internal::{{method.name}}MethodCallback, v8Undef ined(), defaultSignature, {{method.number_of_required_arguments}}); 695 v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate::New(iso late, {{cpp_class_or_partial}}V8Internal::{{method.name}}MethodCallback, v8Undef ined(), defaultSignature, {{method.number_of_required_arguments}});
696 v8::Local<v8::Function> function = ->GetFunction(isolate->GetCurrentContext())). ToLocalChecked(); 696 v8::Local<v8::Function> function = ->GetFunction(isolate->GetCurrentContext())). ToLocalChecked();
697 v8CallOrCrash(prototypeObject->Set(isolate->GetCurrentContext(), v8AtomicString( isolate, "{{method.name}}"), function)); 697 v8CallOrCrash(prototypeObject->Set(isolate->GetCurrentContext(), v8AtomicString( isolate, "{{method.name}}"), function));
698 {% endfilter %}{# runtime_enabled() #} 698 {% endfilter %}{# runtime_enabled() #}
699 {% endfilter %}{# exposed() #} 699 {% endfilter %}{# exposed() #}
700 {% endfor %} 700 {% endfor %}
701 {% endif %} 701 {% endif %}
702 {%- endmacro %} 702 {%- endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698