Bug 1028588 - Update AccEventGen.py to whitelist the dangerous public destructors that it generates - r=tbsaunde
--- a/accessible/xpcom/AccEventGen.py
+++ b/accessible/xpcom/AccEventGen.py
@@ -76,16 +76,24 @@ def print_header_file(fd, conf):
for iface in filter(lambda i: i.name != "nsISupports", baseinterfaces):
fd.write(" NS_DECL_%s\n" % iface.name.upper())
fd.write("private:\n")
for a in attributes:
fd.write(" %s\n" % attributeVariableTypeAndName(a))
fd.write("};\n\n")
+ fd.write("namespace mozilla {\n"
+ "template<>\n"
+ "struct HasDangerousPublicDestructor<%s>\n"
+ "{\n"
+ " static const bool value = true;\n"
+ "};\n"
+ "}\n" % classname)
+
fd.write("#endif\n")
def interfaceAttributeTypes(idl):
ifaces = filter(lambda p: p.kind == "interface", idl.productions)
attributes = []
for i in ifaces:
ifaceAttributes = allAttributes(i)
attributes.extend(ifaceAttributes)