OLD | NEW |
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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 { | 491 { |
492 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 492 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
493 {{cpp_class}}V8Internal::{{method.name}}OriginSafeMethodGetter{{world_suffix
}}(info); | 493 {{cpp_class}}V8Internal::{{method.name}}OriginSafeMethodGetter{{world_suffix
}}(info); |
494 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 494 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
495 } | 495 } |
496 {% endmacro %} | 496 {% endmacro %} |
497 | 497 |
498 | 498 |
499 {##############################################################################} | 499 {##############################################################################} |
500 {% macro method_implemented_in_private_script(method) %} | 500 {% macro method_implemented_in_private_script(method) %} |
501 bool {{v8_class}}::{{method.name}}MethodImplementedInPrivateScript({{method.argu
ment_declarations_for_private_script | join(', ')}}) | 501 bool {{v8_class}}::PrivateScript::{{method.name}}Method({{method.argument_declar
ations_for_private_script | join(', ')}}) |
502 { | 502 { |
503 if (!frame) | 503 if (!frame) |
504 return false; | 504 return false; |
505 v8::HandleScope handleScope(toIsolate(frame)); | 505 v8::HandleScope handleScope(toIsolate(frame)); |
506 ScriptForbiddenScope::AllowUserAgentScript script; | 506 ScriptForbiddenScope::AllowUserAgentScript script; |
507 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); | 507 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::privat
eScriptIsolatedWorld()); |
508 if (context.IsEmpty()) | 508 if (context.IsEmpty()) |
509 return false; | 509 return false; |
510 ScriptState* scriptState = ScriptState::from(context); | 510 ScriptState* scriptState = ScriptState::from(context); |
511 if (!scriptState->executionContext()) | 511 if (!scriptState->executionContext()) |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), info.GetIsolate
()); | 592 v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), info.GetIsolate
()); |
593 {% else %} | 593 {% else %} |
594 {% set constructor_class = v8_class + ('Constructor' | 594 {% set constructor_class = v8_class + ('Constructor' |
595 if constructor.is_named_constructor else | 595 if constructor.is_named_constructor else |
596 '') %} | 596 '') %} |
597 v8::Handle<v8::Object> wrapper = info.Holder(); | 597 v8::Handle<v8::Object> wrapper = info.Holder(); |
598 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{constr
uctor_class}}::wrapperTypeInfo, wrapper, info.GetIsolate(), {{wrapper_configurat
ion}}); | 598 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{constr
uctor_class}}::wrapperTypeInfo, wrapper, info.GetIsolate(), {{wrapper_configurat
ion}}); |
599 {% endif %} | 599 {% endif %} |
600 v8SetReturnValue(info, wrapper); | 600 v8SetReturnValue(info, wrapper); |
601 {% endmacro %} | 601 {% endmacro %} |
OLD | NEW |