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

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

Issue 770253002: Fix [Exposed=..., RuntimeEnabled=...] IDL code generation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 | « no previous file | Source/bindings/tests/idls/core/TestInterface.idl » ('j') | 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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 {% endif %} 614 {% endif %}
615 {% if conditionally_enabled_methods %} 615 {% if conditionally_enabled_methods %}
616 {# Define per-context enabled operations #} 616 {# Define per-context enabled operations #}
617 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); 617 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
618 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 618 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
619 ASSERT(context); 619 ASSERT(context);
620 620
621 {% for method in conditionally_enabled_methods %} 621 {% for method in conditionally_enabled_methods %}
622 {% filter per_context_enabled(method.per_context_enabled_function) %} 622 {% filter per_context_enabled(method.per_context_enabled_function) %}
623 {% filter exposed(method.exposed_test) %} 623 {% filter exposed(method.exposed_test) %}
624 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all if m ethod.overloads else method.runtime_enabled_function) %}
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()); 625 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());
625 {% endfilter %} 626 {% endfilter %}
626 {% endfilter %} 627 {% endfilter %}
628 {% endfilter %}
627 {% endfor %} 629 {% endfor %}
628 {% endif %} 630 {% endif %}
629 } 631 }
630 {%- endmacro %} 632 {%- endmacro %}
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/tests/idls/core/TestInterface.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698