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

Unified Diff: Source/bindings/templates/interface.cpp

Issue 74783008: IDL compiler: [ActiveDOMObject] interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/templates/interface.h ('k') | Source/bindings/templates/interface_base.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/interface.cpp
diff --git a/Source/bindings/templates/interface.cpp b/Source/bindings/templates/interface.cpp
index af6af90acc878cdde4eac803702262107eddc29b..34892ed6b57b28c447c821e5326c953c09f155e0 100644
--- a/Source/bindings/templates/interface.cpp
+++ b/Source/bindings/templates/interface.cpp
@@ -337,6 +337,18 @@ void {{v8_class_name}}::installPerContextEnabledMethods(v8::Handle<v8::Object> p
{##############################################################################}
+{% block to_active_dom_object %}
+{% if is_active_dom_object %}
+ActiveDOMObject* {{v8_class_name}}::toActiveDOMObject(v8::Handle<v8::Object> object)
haraken 2013/11/18 11:36:50 object => wrapper
Nils Barth (inactive) 2013/11/19 01:06:51 Changes Perl (so needs testing), will do in quick
Nils Barth (inactive) 2013/11/19 02:16:33 Posted in: IDL compiler: rename object => wrapper
+{
+ return toNative(object);
+}
+
+{% endif %}
+{% endblock %}
+
+
+{##############################################################################}
{% block create_wrapper_and_deref_object %}
v8::Handle<v8::Object> {{v8_class_name}}::createWrapper(PassRefPtr<{{cpp_class_name}}> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
@@ -354,7 +366,10 @@ v8::Handle<v8::Object> {{v8_class_name}}::createWrapper(PassRefPtr<{{cpp_class_n
return wrapper;
installPerContextEnabledProperties(wrapper, impl.get(), isolate);
- V8DOMWrapper::associateObjectWithWrapper<{{v8_class_name}}>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
+ {% set wrapper_configuration = 'WrapperConfiguration::Dependent'
+ if is_active_dom_object else
+ 'WrapperConfiguration::Independent' %}
+ V8DOMWrapper::associateObjectWithWrapper<{{v8_class_name}}>(impl, &wrapperTypeInfo, wrapper, isolate, {{wrapper_configuration}});
return wrapper;
}
« no previous file with comments | « Source/bindings/templates/interface.h ('k') | Source/bindings/templates/interface_base.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698