OLD | NEW |
---|---|
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 Loading... | |
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 %} |
OLD | NEW |