Chromium Code Reviews| 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; |
| } |