Index: Source/bindings/templates/methods.cpp |
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp |
index b220f032227d74b2f494154d4bd0b0ddc8a8d8b3..0afbe837cbf77c873e8e8b9ad4caac5544b6ef24 100644 |
--- a/Source/bindings/templates/methods.cpp |
+++ b/Source/bindings/templates/methods.cpp |
@@ -630,32 +630,25 @@ V8DOMConfiguration::installMethod(isolate, {{method.function_template}}, {{metho |
{######################################} |
{% macro install_conditionally_enabled_methods() %} |
-void {{v8_class_or_partial}}::installConditionallyEnabledMethods(v8::Local<v8::Object> prototypeObject, v8::Isolate* isolate) |
-{ |
- {% if is_partial %} |
- {{v8_class}}::installConditionallyEnabledMethods(prototypeObject, isolate); |
- {% endif %} |
- {% if conditionally_enabled_methods %} |
- {# Define per-context enabled operations #} |
- v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domTemplate(isolate)); |
- ExecutionContext* context = toExecutionContext(prototypeObject->CreationContext()); |
- ASSERT(context); |
- |
- {% for method in conditionally_enabled_methods %} |
- {% filter per_context_enabled(method.overloads.per_context_enabled_function_all |
- if method.overloads else |
- method.per_context_enabled_function) %} |
- {% filter exposed(method.overloads.exposed_test_all |
- if method.overloads else |
- method.exposed_test) %} |
- {% filter runtime_enabled(method.overloads.runtime_enabled_function_all |
+{% if conditionally_enabled_methods %} |
+{# Define per-context enabled operations #} |
+v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domTemplate(isolate)); |
+ExecutionContext* context = toExecutionContext(prototypeObject->CreationContext()); |
+ASSERT(context); |
+{% for method in conditionally_enabled_methods %} |
+{% filter per_context_enabled(method.overloads.per_context_enabled_function_all |
if method.overloads else |
- method.runtime_enabled_function) %} |
- prototypeObject->Set(v8AtomicString(isolate, "{{method.name}}"), v8::FunctionTemplate::New(isolate, {{cpp_class_or_partial}}V8Internal::{{method.name}}MethodCallback, v8Undefined(), defaultSignature, {{method.number_of_required_arguments}})->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); |
- {% endfilter %}{# runtime_enabled() #} |
- {% endfilter %}{# exposed() #} |
- {% endfilter %}{# per_context_enabled() #} |
- {% endfor %} |
- {% endif %} |
-} |
+ method.per_context_enabled_function) %} |
+{% filter exposed(method.overloads.exposed_test_all |
+ if method.overloads else |
+ method.exposed_test) %} |
+{% filter runtime_enabled(method.overloads.runtime_enabled_function_all |
+ if method.overloads else |
+ method.runtime_enabled_function) %} |
+prototypeObject->Set(v8AtomicString(isolate, "{{method.name}}"), v8::FunctionTemplate::New(isolate, {{cpp_class_or_partial}}V8Internal::{{method.name}}MethodCallback, v8Undefined(), defaultSignature, {{method.number_of_required_arguments}})->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); |
+{% endfilter %}{# runtime_enabled() #} |
+{% endfilter %}{# exposed() #} |
+{% endfilter %}{# per_context_enabled() #} |
+{% endfor %} |
+{% endif %} |
{%- endmacro %} |