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

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

Issue 721383003: bindings: Retires ScriptWrappableBase mostly. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 unified diff | Download patch | Annotate | Revision Log
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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 } 566 }
567 {% endmacro %} 567 {% endmacro %}
568 568
569 569
570 {##############################################################################} 570 {##############################################################################}
571 {% macro generate_constructor_wrapper(constructor) %} 571 {% macro generate_constructor_wrapper(constructor) %}
572 {% set constructor_class = v8_class + ('Constructor' 572 {% set constructor_class = v8_class + ('Constructor'
573 if constructor.is_named_constructor else 573 if constructor.is_named_constructor else
574 '') %} 574 '') %}
575 v8::Handle<v8::Object> wrapper = info.Holder(); 575 v8::Handle<v8::Object> wrapper = info.Holder();
576 {% if is_script_wrappable %}
577 impl->associateWithWrapper(&{{constructor_class}}::wrapperTypeInfo, wrapper, inf o.GetIsolate()); 576 impl->associateWithWrapper(&{{constructor_class}}::wrapperTypeInfo, wrapper, inf o.GetIsolate());
578 {% else %}
579 V8DOMWrapper::associateObjectWithWrapper(info.GetIsolate(), impl.get(), &{{const ructor_class}}::wrapperTypeInfo, wrapper);
580 {% endif %}
581 v8SetReturnValue(info, wrapper); 577 v8SetReturnValue(info, wrapper);
582 {% endmacro %} 578 {% endmacro %}
583 579
584 580
585 {##############################################################################} 581 {##############################################################################}
586 {% macro method_configuration(method) %} 582 {% macro method_configuration(method) %}
587 {% set method_callback = 583 {% set method_callback =
588 '%sV8Internal::%sMethodCallback' % (cpp_class_or_partial, method.name) %} 584 '%sV8Internal::%sMethodCallback' % (cpp_class_or_partial, method.name) %}
589 {% set method_callback_for_main_world = 585 {% set method_callback_for_main_world =
590 '%sV8Internal::%sMethodCallbackForMainWorld' % (cpp_class_or_partial, method. name) 586 '%sV8Internal::%sMethodCallbackForMainWorld' % (cpp_class_or_partial, method. name)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 {% for method in conditionally_enabled_methods %} 621 {% for method in conditionally_enabled_methods %}
626 {% filter per_context_enabled(method.per_context_enabled_function) %} 622 {% filter per_context_enabled(method.per_context_enabled_function) %}
627 {% filter exposed(method.exposed_test) %} 623 {% filter exposed(method.exposed_test) %}
628 prototypeObject->Set(v8AtomicString(isolate, "{{method.name}}"), v8::Functio nTemplate::New(isolate, {{cpp_class_or_partial}}V8Internal::{{method.name}}Metho dCallback, v8Undefined(), defaultSignature, {{method.number_of_required_argument s}})->GetFunction()); 624 prototypeObject->Set(v8AtomicString(isolate, "{{method.name}}"), v8::Functio nTemplate::New(isolate, {{cpp_class_or_partial}}V8Internal::{{method.name}}Metho dCallback, v8Undefined(), defaultSignature, {{method.number_of_required_argument s}})->GetFunction());
629 {% endfilter %} 625 {% endfilter %}
630 {% endfilter %} 626 {% endfilter %}
631 {% endfor %} 627 {% endfor %}
632 {% endif %} 628 {% endif %}
633 } 629 }
634 {%- endmacro %} 630 {%- endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698