Index: Source/bindings/templates/interface.cpp |
diff --git a/Source/bindings/templates/interface.cpp b/Source/bindings/templates/interface.cpp |
index 4059005269323210e0aae28bc8300c47630e1598..2ad6383858b2319bfe4855801334a973247a40c3 100644 |
--- a/Source/bindings/templates/interface.cpp |
+++ b/Source/bindings/templates/interface.cpp |
@@ -476,7 +476,16 @@ static void {{cpp_class}}OriginSafeMethodSetterCallback(v8::Local<v8::Name> name |
{% if named_constructor %} |
{% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class |
if is_active_dom_object else '0' %} |
+// Suppress warning: global constructors, because struct WrapperTypeInfo is trivial |
Nico
2015/06/29 05:23:25
Initializing a global with a dllimported function
tasak
2015/06/29 05:48:25
I see. I will fix the comments.
|
+// and does not depend on another global objects. |
+#if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
+#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}} }; |
+#if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
+#pragma clang diagnostic pop |
+#endif |
{{generate_constructor(named_constructor)}} |
v8::Local<v8::FunctionTemplate> {{v8_class}}Constructor::domTemplate(v8::Isolate* isolate) |
@@ -581,11 +590,20 @@ void {{v8_class}}::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* script |
{% block shadow_attributes %} |
{% from 'attributes.cpp' import attribute_configuration with context %} |
{% if interface_name == 'Window' %} |
+// Suppress warning: global constructors, because AttributeConfiguration is trivial |
+// and does not depend on another global objects. |
+#if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
+#pragma clang diagnostic push |
+#pragma clang diagnostic ignored "-Wglobal-constructors" |
+#endif |
static const V8DOMConfiguration::AttributeConfiguration shadowAttributes[] = { |
{% for attribute in attributes if attribute.is_unforgeable and attribute.should_be_exposed_to_script %} |
{{attribute_configuration(attribute)}}, |
{% endfor %} |
}; |
+#if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
+#pragma clang diagnostic pop |
+#endif |
{% endif %} |
{% endblock %} |