| OLD | NEW |
| 1 {##############################################################################} | 1 {##############################################################################} |
| 2 {% macro attribute_getter(attribute, world_suffix) %} | 2 {% macro attribute_getter(attribute, world_suffix) %} |
| 3 {% filter conditional(attribute.conditional_string) %} | 3 {% filter conditional(attribute.conditional_string) %} |
| 4 static void {{attribute.name}}AttributeGetter{{world_suffix}}( | 4 static void {{attribute.name}}AttributeGetter{{world_suffix}}( |
| 5 {%- if attribute.is_expose_js_accessors %} | 5 {%- if attribute.is_expose_js_accessors %} |
| 6 const v8::FunctionCallbackInfo<v8::Value>& info | 6 const v8::FunctionCallbackInfo<v8::Value>& info |
| 7 {%- else %} | 7 {%- else %} |
| 8 const v8::PropertyCallbackInfo<v8::Value>& info | 8 const v8::PropertyCallbackInfo<v8::Value>& info |
| 9 {%- endif %}) | 9 {%- endif %}) |
| 10 { | 10 { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 } | 35 } |
| 36 {% elif not attribute.is_static %} | 36 {% elif not attribute.is_static %} |
| 37 {{cpp_class}}* impl = {{v8_class}}::toNative(holder); | 37 {{cpp_class}}* impl = {{v8_class}}::toNative(holder); |
| 38 {% endif %} | 38 {% endif %} |
| 39 {% if interface_name == 'Window' and attribute.idl_type == 'EventHandler' %} | 39 {% if interface_name == 'Window' and attribute.idl_type == 'EventHandler' %} |
| 40 if (!impl->document()) | 40 if (!impl->document()) |
| 41 return; | 41 return; |
| 42 {% endif %} | 42 {% endif %} |
| 43 {# Local variables #} | 43 {# Local variables #} |
| 44 {% if attribute.is_call_with_execution_context %} | 44 {% if attribute.is_call_with_execution_context %} |
| 45 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 45 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 46 {% endif %} | 46 {% endif %} |
| 47 {% if attribute.is_call_with_script_state %} | 47 {% if attribute.is_call_with_script_state %} |
| 48 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 48 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 49 {% endif %} | 49 {% endif %} |
| 50 {% if attribute.is_check_security_for_node or | 50 {% if attribute.is_check_security_for_node or |
| 51 attribute.is_getter_raises_exception %} | 51 attribute.is_getter_raises_exception %} |
| 52 ExceptionState exceptionState(ExceptionState::GetterContext, "{{attribute.na
me}}", "{{interface_name}}", holder, info.GetIsolate()); | 52 ExceptionState exceptionState(ExceptionState::GetterContext, "{{attribute.na
me}}", "{{interface_name}}", holder, info.GetIsolate()); |
| 53 {% endif %} | 53 {% endif %} |
| 54 {% if attribute.is_nullable and not attribute.has_type_checking_nullable %} | 54 {% if attribute.is_nullable and not attribute.has_type_checking_nullable %} |
| 55 bool isNull = false; | 55 bool isNull = false; |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 {% endif %} | 269 {% endif %} |
| 270 {# Pre-set context #} | 270 {# Pre-set context #} |
| 271 {% if attribute.is_custom_element_callbacks or | 271 {% if attribute.is_custom_element_callbacks or |
| 272 (attribute.is_reflect and | 272 (attribute.is_reflect and |
| 273 not(attribute.idl_type == 'DOMString' and is_node)) %} | 273 not(attribute.idl_type == 'DOMString' and is_node)) %} |
| 274 {# Skip on compact node DOMString getters #} | 274 {# Skip on compact node DOMString getters #} |
| 275 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 275 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 276 {% endif %} | 276 {% endif %} |
| 277 {% if attribute.is_call_with_execution_context or | 277 {% if attribute.is_call_with_execution_context or |
| 278 attribute.is_setter_call_with_execution_context %} | 278 attribute.is_setter_call_with_execution_context %} |
| 279 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 279 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 280 {% endif %} | 280 {% endif %} |
| 281 {# Set #} | 281 {# Set #} |
| 282 {{attribute.cpp_setter}}; | 282 {{attribute.cpp_setter}}; |
| 283 {# Post-set #} | 283 {# Post-set #} |
| 284 {% if attribute.is_setter_raises_exception %} | 284 {% if attribute.is_setter_raises_exception %} |
| 285 exceptionState.throwIfNeeded(); | 285 exceptionState.throwIfNeeded(); |
| 286 {% endif %} | 286 {% endif %} |
| 287 {% if attribute.cached_attribute_validation_method %} | 287 {% if attribute.cached_attribute_validation_method %} |
| 288 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "{{attribute.name}}")); // Invalidate the cached value. | 288 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i
nfo.GetIsolate(), "{{attribute.name}}")); // Invalidate the cached value. |
| 289 {% endif %} | 289 {% endif %} |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 {% endif %} | 334 {% endif %} |
| 335 {% if attribute.has_custom_setter %} | 335 {% if attribute.has_custom_setter %} |
| 336 {{v8_class}}::{{attribute.name}}AttributeSetterCustom(v8Value, info); | 336 {{v8_class}}::{{attribute.name}}AttributeSetterCustom(v8Value, info); |
| 337 {% else %} | 337 {% else %} |
| 338 {{cpp_class}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(v
8Value, info); | 338 {{cpp_class}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(v
8Value, info); |
| 339 {% endif %} | 339 {% endif %} |
| 340 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 340 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 341 } | 341 } |
| 342 {% endfilter %} | 342 {% endfilter %} |
| 343 {% endmacro %} | 343 {% endmacro %} |
| OLD | NEW |