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

Side by Side Diff: Source/bindings/templates/interface.cpp

Issue 213363006: Oilpan: Add [WillBeGarbageCollected] to Event.idl (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 {% extends 'interface_base.cpp' %} 1 {% extends 'interface_base.cpp' %}
2 2
3 3
4 {##############################################################################} 4 {##############################################################################}
5 {% macro attribute_configuration(attribute) %} 5 {% macro attribute_configuration(attribute) %}
6 {% set getter_callback = 6 {% set getter_callback =
7 '%sV8Internal::%sAttributeGetterCallback' % 7 '%sV8Internal::%sAttributeGetterCallback' %
8 (cpp_class, attribute.name) 8 (cpp_class, attribute.name)
9 if not attribute.constructor_type else 9 if not attribute.constructor_type else
10 ('%sV8Internal::%sConstructorGetterCallback' % 10 ('%sV8Internal::%sConstructorGetterCallback' %
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 } 639 }
640 {# Store attributes of type |any| on the wrapper to avoid leaking them 640 {# Store attributes of type |any| on the wrapper to avoid leaking them
641 between isolated worlds. #} 641 between isolated worlds. #}
642 {% for attribute in any_type_attributes %} 642 {% for attribute in any_type_attributes %}
643 options.get("{{attribute.name}}", {{attribute.name}}); 643 options.get("{{attribute.name}}", {{attribute.name}});
644 if (!{{attribute.name}}.IsEmpty()) 644 if (!{{attribute.name}}.IsEmpty())
645 V8HiddenValue::setHiddenValue(isolate, info.Holder(), v8AtomicString (isolate, "{{attribute.name}}"), {{attribute.name}}); 645 V8HiddenValue::setHiddenValue(isolate, info.Holder(), v8AtomicString (isolate, "{{attribute.name}}"), {{attribute.name}});
646 {% endfor %} 646 {% endfor %}
647 } 647 }
648 {% if is_constructor_raises_exception %} 648 {% if is_constructor_raises_exception %}
649 RefPtr<{{cpp_class}}> event = {{cpp_class}}::create(type, eventInit, excepti onState); 649 RefPtrWillBeRawPtr<{{cpp_class}}> event = {{cpp_class}}::create(type, eventI nit, exceptionState);
650 if (exceptionState.throwIfNeeded()) 650 if (exceptionState.throwIfNeeded())
651 return; 651 return;
652 {% else %} 652 {% else %}
653 RefPtr<{{cpp_class}}> event = {{cpp_class}}::create(type, eventInit); 653 RefPtrWillBeRawPtr<{{cpp_class}}> event = {{cpp_class}}::create(type, eventI nit);
654 {% endif %} 654 {% endif %}
655 {% if any_type_attributes and not interface_name == 'ErrorEvent' %} 655 {% if any_type_attributes and not interface_name == 'ErrorEvent' %}
656 {# If we're in an isolated world, create a SerializedScriptValue and store 656 {# If we're in an isolated world, create a SerializedScriptValue and store
657 it in the event for later cloning if the property is accessed from 657 it in the event for later cloning if the property is accessed from
658 another world. The main world case is handled lazily (in custom code). 658 another world. The main world case is handled lazily (in custom code).
659 659
660 We do not clone Error objects (exceptions), for 2 reasons: 660 We do not clone Error objects (exceptions), for 2 reasons:
661 1) Errors carry a reference to the isolated world's global object, and 661 1) Errors carry a reference to the isolated world's global object, and
662 thus passing it around would cause leakage. 662 thus passing it around would cause leakage.
663 2) Errors cannot be cloned (or serialized): 663 2) Errors cannot be cloned (or serialized):
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 {% endfilter %} 1315 {% endfilter %}
1316 } 1316 }
1317 1317
1318 template<> 1318 template<>
1319 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) 1319 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate)
1320 { 1320 {
1321 return toV8(impl, creationContext, isolate); 1321 return toV8(impl, creationContext, isolate);
1322 } 1322 }
1323 1323
1324 {% endblock %} 1324 {% endblock %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698