| 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 {% if method.has_exception_state %} | 6 {% if method.has_exception_state %} |
| 7 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{method.na
me}}", "{{interface_name}}", info.Holder(), info.GetIsolate()); | 7 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{method.na
me}}", "{{interface_name}}", info.Holder(), info.GetIsolate()); |
| 8 {% endif %} | 8 {% endif %} |
| 9 {% if method.name in ['addEventListener', 'removeEventListener'] %} | 9 {% if method.name in ['addEventListener', 'removeEventListener'] %} |
| 10 {{add_remove_event_listener_method(method.name) | indent}} | 10 {{add_remove_event_listener_method(method.name) | indent}} |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 {% filter conditional(method.conditional_string) %} | 239 {% filter conditional(method.conditional_string) %} |
| 240 static void {{method.name}}MethodCallback{{world_suffix}}(const v8::FunctionCall
backInfo<v8::Value>& info) | 240 static void {{method.name}}MethodCallback{{world_suffix}}(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 241 { | 241 { |
| 242 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 242 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 243 {% if method.measure_as %} | 243 {% if method.measure_as %} |
| 244 UseCounter::count(activeExecutionContext(), UseCounter::{{method.measure_as}
}); | 244 UseCounter::count(activeExecutionContext(), UseCounter::{{method.measure_as}
}); |
| 245 {% endif %} | 245 {% endif %} |
| 246 {% if method.deprecate_as %} | 246 {% if method.deprecate_as %} |
| 247 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::{{method.
deprecate_as}}); | 247 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::{{method.
deprecate_as}}); |
| 248 {% endif %} | 248 {% endif %} |
| 249 {% for argument in method.arguments if argument.idl_type == 'Node' %} |
| 250 if (V8DOMWrapper::isWrapperOfType(info[{{argument.index}}], &V8Attr::wrapper
TypeInfo)) |
| 251 UseCounter::count(activeExecutionContext(), UseCounter::AttrUsedAsNodePa
rameter); |
| 252 {% endfor %} |
| 249 {% if world_suffix in method.activity_logging_world_list %} | 253 {% if world_suffix in method.activity_logging_world_list %} |
| 250 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 254 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
| 251 if (contextData && contextData->activityLogger()) { | 255 if (contextData && contextData->activityLogger()) { |
| 252 {# FIXME: replace toVectorOfArguments with toNativeArguments(info, 0) | 256 {# FIXME: replace toVectorOfArguments with toNativeArguments(info, 0) |
| 253 and delete toVectorOfArguments #} | 257 and delete toVectorOfArguments #} |
| 254 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); | 258 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle
<v8::Value> >(info, 0); |
| 255 contextData->activityLogger()->log("{{interface_name}}.{{method.name}}",
info.Length(), loggerArgs.data(), "Method"); | 259 contextData->activityLogger()->log("{{interface_name}}.{{method.name}}",
info.Length(), loggerArgs.data(), "Method"); |
| 256 } | 260 } |
| 257 {% endif %} | 261 {% endif %} |
| 258 {% if method.is_custom %} | 262 {% if method.is_custom %} |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 v8::Handle<v8::Object> wrapper = info.Holder(); | 394 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 391 {% if is_constructor_raises_exception %} | 395 {% if is_constructor_raises_exception %} |
| 392 if (exceptionState.throwIfNeeded()) | 396 if (exceptionState.throwIfNeeded()) |
| 393 return; | 397 return; |
| 394 {% endif %} | 398 {% endif %} |
| 395 | 399 |
| 396 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{v8
_class}}Constructor::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfigu
ration::Dependent); | 400 V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(impl.release(), &{{v8
_class}}Constructor::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfigu
ration::Dependent); |
| 397 v8SetReturnValue(info, wrapper); | 401 v8SetReturnValue(info, wrapper); |
| 398 } | 402 } |
| 399 {% endmacro %} | 403 {% endmacro %} |
| OLD | NEW |