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

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

Issue 1309653002: bindings: Fixes build breakage of per-method [Exposed]. (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
« no previous file with comments | « no previous file | Source/bindings/tests/results/core/V8TestInterface.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 {% 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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 ExecutionContext* context = toExecutionContext(prototypeObject->CreationContext( )); 684 ExecutionContext* context = toExecutionContext(prototypeObject->CreationContext( ));
685 ASSERT(context); 685 ASSERT(context);
686 {% for method in conditionally_enabled_methods %} 686 {% for method in conditionally_enabled_methods %}
687 {% filter exposed(method.overloads.exposed_test_all 687 {% filter exposed(method.overloads.exposed_test_all
688 if method.overloads else 688 if method.overloads else
689 method.exposed_test) %} 689 method.exposed_test) %}
690 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all 690 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all
691 if method.overloads else 691 if method.overloads else
692 method.runtime_enabled_function) %} 692 method.runtime_enabled_function) %}
693 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}}); 693 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}});
694 v8::Local<v8::Function> function = ->GetFunction(isolate->GetCurrentContext())). ToLocalChecked(); 694 v8::Local<v8::Function> function = v8CallOrCrash(functionTemplate->GetFunction(i solate->GetCurrentContext()));
bashi 2015/08/21 06:55:11 My bad :(
695 v8CallOrCrash(prototypeObject->Set(isolate->GetCurrentContext(), v8AtomicString( isolate, "{{method.name}}"), function)); 695 v8CallOrCrash(prototypeObject->Set(isolate->GetCurrentContext(), v8AtomicString( isolate, "{{method.name}}"), function));
696 {% endfilter %}{# runtime_enabled() #} 696 {% endfilter %}{# runtime_enabled() #}
697 {% endfilter %}{# exposed() #} 697 {% endfilter %}{# exposed() #}
698 {% endfor %} 698 {% endfor %}
699 {% endif %} 699 {% endif %}
700 {%- endmacro %} 700 {%- endmacro %}
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/tests/results/core/V8TestInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698