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

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

Issue 695773002: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 {% if has_custom_wrap %} 572 {% if has_custom_wrap %}
573 v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), info.GetIsolate ()); 573 v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), info.GetIsolate ());
574 {% else %} 574 {% else %}
575 {% set constructor_class = v8_class + ('Constructor' 575 {% set constructor_class = v8_class + ('Constructor'
576 if constructor.is_named_constructor else 576 if constructor.is_named_constructor else
577 '') %} 577 '') %}
578 v8::Handle<v8::Object> wrapper = info.Holder(); 578 v8::Handle<v8::Object> wrapper = info.Holder();
579 {% if is_script_wrappable %} 579 {% if is_script_wrappable %}
580 impl->associateWithWrapper(&{{constructor_class}}::wrapperTypeInfo, wrapper, inf o.GetIsolate()); 580 impl->associateWithWrapper(&{{constructor_class}}::wrapperTypeInfo, wrapper, inf o.GetIsolate());
581 {% else %} 581 {% else %}
582 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{constr uctor_class}}::wrapperTypeInfo, wrapper, info.GetIsolate()); 582 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(info.GetIsolate(), impl.r elease(), &{{constructor_class}}::wrapperTypeInfo, wrapper);
583 {% endif %} 583 {% endif %}
584 {% endif %} 584 {% endif %}
585 v8SetReturnValue(info, wrapper); 585 v8SetReturnValue(info, wrapper);
586 {% endmacro %} 586 {% endmacro %}
587 587
588 588
589 {##############################################################################} 589 {##############################################################################}
590 {% macro method_configuration(method) %} 590 {% macro method_configuration(method) %}
591 {% set method_callback = 591 {% set method_callback =
592 '%sV8Internal::%sMethodCallback' % (cpp_class_or_partial, method.name) %} 592 '%sV8Internal::%sMethodCallback' % (cpp_class_or_partial, method.name) %}
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 {% for method in conditionally_enabled_methods %} 629 {% for method in conditionally_enabled_methods %}
630 {% filter per_context_enabled(method.per_context_enabled_function) %} 630 {% filter per_context_enabled(method.per_context_enabled_function) %}
631 {% filter exposed(method.exposed_test) %} 631 {% filter exposed(method.exposed_test) %}
632 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()); 632 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());
633 {% endfilter %} 633 {% endfilter %}
634 {% endfilter %} 634 {% endfilter %}
635 {% endfor %} 635 {% endfor %}
636 {% endif %} 636 {% endif %}
637 } 637 }
638 {%- endmacro %} 638 {%- endmacro %}
OLDNEW
« no previous file with comments | « Source/bindings/templates/interface.cpp ('k') | Source/bindings/tests/results/core/V8TestInterfaceNotScriptWrappable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698