Index: third_party/WebKit/Source/bindings/templates/interface.cpp |
diff --git a/third_party/WebKit/Source/bindings/templates/interface.cpp b/third_party/WebKit/Source/bindings/templates/interface.cpp |
index ca3384212f2425b4429a64c8464301ddd46e7434..cd9099936adf991f54f65ef57b394c08b6aad057 100644 |
--- a/third_party/WebKit/Source/bindings/templates/interface.cpp |
+++ b/third_party/WebKit/Source/bindings/templates/interface.cpp |
@@ -482,7 +482,7 @@ static void {{cpp_class}}OriginSafeMethodSetterCallback(v8::Local<v8::Name> name |
#pragma clang diagnostic push |
#pragma clang diagnostic ignored "-Wglobal-constructors" |
#endif |
-const WrapperTypeInfo {{v8_class}}Constructor::wrapperTypeInfo = { gin::kEmbedderBlink, {{v8_class}}Constructor::domTemplate, {{v8_class}}::refObject, {{v8_class}}::derefObject, {{v8_class}}::trace, {{to_active_dom_object}}, 0, {{v8_class}}::preparePrototypeObject, {{v8_class}}::installConditionallyEnabledProperties, "{{interface_name}}", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{event_target_inheritance}}, WrapperTypeInfo::{{lifetime}}, WrapperTypeInfo::{{gc_type}} }; |
+const WrapperTypeInfo {{v8_class}}Constructor::wrapperTypeInfo = { gin::kEmbedderBlink, {{v8_class}}Constructor::domTemplate, {{v8_class}}::refObject, {{v8_class}}::derefObject, {{v8_class}}::trace, {{to_active_dom_object}}, 0, {{v8_class}}::preparePrototypeAndInterfaceObject, {{v8_class}}::installConditionallyEnabledProperties, "{{interface_name}}", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo::{{event_target_inheritance}}, WrapperTypeInfo::{{lifetime}}, WrapperTypeInfo::{{gc_type}} }; |
#if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
#pragma clang diagnostic pop |
#endif |
@@ -787,7 +787,7 @@ v8::Local<v8::Object> {{v8_class}}::findInstanceInPrototypeChain(v8::Local<v8::V |
{% if has_conditional_attributes_on_instance %} |
void {{v8_class}}::installConditionallyEnabledProperties(v8::Local<v8::Object> instanceObject, v8::Isolate* isolate) |
{ |
-#error TODO(yukishiino): Rename this function to prepareInstanceObject (c.f. preparePrototypeObject) and implement this function if necessary. http://crbug.com/503508 |
+#error TODO(yukishiino): Rename this function to prepareInstanceObject (c.f. preparePrototypeAndInterfaceObject) and implement this function if necessary. http://crbug.com/503508 |
} |
{% endif %} |
@@ -795,10 +795,10 @@ void {{v8_class}}::installConditionallyEnabledProperties(v8::Local<v8::Object> i |
{##############################################################################} |
-{% block prepare_prototype_object %} |
+{% block prepare_prototype_and_interface_object %} |
{% from 'methods.cpp' import install_conditionally_enabled_methods with context %} |
{% if unscopeables or has_conditional_attributes_on_prototype or conditionally_enabled_methods %} |
-void {{v8_class}}::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8::Object> prototypeObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) |
+void {{v8_class}}::preparePrototypeAndInterfaceObject(v8::Isolate* isolate, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) |
{ |
{% if unscopeables %} |
{{install_unscopeables() | indent}} |
@@ -841,7 +841,7 @@ v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTempla |
{% for attribute in attributes if attribute.exposed_test and attribute.on_prototype %} |
{% filter exposed(attribute.exposed_test) %} |
const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {{attribute_configuration(attribute)}}; |
-V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), prototypeObject, v8::Local<v8::Function>(), signature, accessorConfiguration); |
+V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); |
{% endfilter %} |
{% endfor %} |
{% endmacro %} |
@@ -890,11 +890,11 @@ void {{v8_class}}::derefObject(ScriptWrappable* scriptWrappable) |
{% if has_partial_interface %} |
InstallTemplateFunction {{v8_class}}::install{{v8_class}}TemplateFunction = (InstallTemplateFunction)&{{v8_class}}::install{{v8_class}}Template; |
-void {{v8_class}}::updateWrapperTypeInfo(InstallTemplateFunction installTemplateFunction, PreparePrototypeObjectFunction preparePrototypeObjectFunction) |
+void {{v8_class}}::updateWrapperTypeInfo(InstallTemplateFunction installTemplateFunction, PreparePrototypeAndInterfaceObjectFunction preparePrototypeAndInterfaceObjectFunction) |
{ |
{{v8_class}}::install{{v8_class}}TemplateFunction = installTemplateFunction; |
- if (preparePrototypeObjectFunction) |
- {{v8_class}}::wrapperTypeInfo.preparePrototypeObjectFunction = preparePrototypeObjectFunction; |
+ if (preparePrototypeAndInterfaceObjectFunction) |
+ {{v8_class}}::wrapperTypeInfo.preparePrototypeAndInterfaceObjectFunction = preparePrototypeAndInterfaceObjectFunction; |
} |
{% for method in methods if method.overloads and method.overloads.has_partial_overloads %} |