Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(537)

Side by Side Diff: sky/engine/bindings/templates/attributes.cpp

Issue 872043003: module.exports should default to an empty object. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/bindings/core/v8/ScriptValue.h ('k') | sky/engine/core/app/AbstractModule.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 {% if attribute.is_custom_element_callbacks or 242 {% if attribute.is_custom_element_callbacks or
243 (attribute.is_reflect and 243 (attribute.is_reflect and
244 not(attribute.idl_type == 'DOMString' and is_node)) %} 244 not(attribute.idl_type == 'DOMString' and is_node)) %}
245 {# Skip on compact node DOMString getters #} 245 {# Skip on compact node DOMString getters #}
246 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; 246 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
247 {% endif %} 247 {% endif %}
248 {% if attribute.is_call_with_execution_context or 248 {% if attribute.is_call_with_execution_context or
249 attribute.is_setter_call_with_execution_context %} 249 attribute.is_setter_call_with_execution_context %}
250 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 250 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
251 {% endif %} 251 {% endif %}
252 {% if attribute.is_call_with_script_state %}
253 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
254 {% endif %}
252 {# Set #} 255 {# Set #}
253 {{attribute.cpp_setter}}; 256 {{attribute.cpp_setter}};
254 {# Post-set #} 257 {# Post-set #}
255 {% if attribute.is_setter_raises_exception %} 258 {% if attribute.is_setter_raises_exception %}
256 exceptionState.throwIfNeeded(); 259 exceptionState.throwIfNeeded();
257 {% endif %} 260 {% endif %}
258 {% if attribute.cached_attribute_validation_method %} 261 {% if attribute.cached_attribute_validation_method %}
259 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i nfo.GetIsolate(), "{{attribute.name}}")); // Invalidate the cached value. 262 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i nfo.GetIsolate(), "{{attribute.name}}")); // Invalidate the cached value.
260 {% endif %} 263 {% endif %}
261 } 264 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 access_control, 400 access_control,
398 property_attribute, 401 property_attribute,
399 only_exposed_to_private_script, 402 only_exposed_to_private_script,
400 ] %} 403 ] %}
401 {% if not attribute.is_expose_js_accessors %} 404 {% if not attribute.is_expose_js_accessors %}
402 {% set attribute_configuration_list = attribute_configuration_list 405 {% set attribute_configuration_list = attribute_configuration_list
403 + [on_prototype] %} 406 + [on_prototype] %}
404 {% endif %} 407 {% endif %}
405 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} 408 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}}
406 {%- endmacro %} 409 {%- endmacro %}
OLDNEW
« no previous file with comments | « sky/engine/bindings/core/v8/ScriptValue.h ('k') | sky/engine/core/app/AbstractModule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698