Bug 877501 - Generate pref check code for interfaces with [NoInterfaceObject, NavigatorProperty]. r=bz

--HG--
extra : rebase_source : 02b9028c3ab215df0378af109d2bcac15d28e9b4
This commit is contained in:
Reuben Morais 2013-05-30 08:21:52 -07:00
parent 768a890cbb
commit d74dacf938

View File

@ -7500,13 +7500,15 @@ class CGDescriptor(CGThing):
if descriptor.interface.hasInterfaceObject():
cgThings.append(CGDefineDOMInterfaceMethod(descriptor))
if (not descriptor.interface.isExternal() and
# Workers stuff is never pref-controlled
not descriptor.workers):
if descriptor.interface.getExtendedAttribute("PrefControlled") is not None:
cgThings.append(CGPrefEnabledNative(descriptor))
elif descriptor.interface.getExtendedAttribute("Pref") is not None:
cgThings.append(CGPrefEnabled(descriptor))
if ((descriptor.interface.hasInterfaceObject() or descriptor.interface.getNavigatorProperty()) and
not descriptor.interface.isExternal() and
# Workers stuff is never pref-controlled
not descriptor.workers):
if descriptor.interface.getExtendedAttribute("PrefControlled") is not None:
cgThings.append(CGPrefEnabledNative(descriptor))
elif descriptor.interface.getExtendedAttribute("Pref") is not None:
cgThings.append(CGPrefEnabled(descriptor))
if descriptor.concrete:
if descriptor.proxy: