Closed Bug 870959 Opened 6 years ago Closed 6 years ago
don't include Preferences
.h or Non Refcounted DOMObject .h in bindings unless necessary
No description provided.
Comment on attachment 748166 [details] [diff] [review] don't include Preferences.h or NonRefcountedDOMObject.h in bindings unless necessary >+ def descriptorRequiresPreferences(desc): I think I'd prefer this function to look like this: iface = desc.iface return any(m.getExtendedAttribute("Pref") for m in iface.members + [iface]) In particular, you shouldn't need Preferences.h for a [Func] on a member, I don't think, nor for [PrefControlled] on an interface. >+ requiresPreferences = any(map(descriptorRequiresPreferences, descriptors)) I'd prefer any(descriptorRequiresPreferences(d) for d in descriptors) so it can stop once it finds one... >+ hasNativeOwnership = any(map(lambda d: d.nativeOwnership == 'owned', How about calling that variable hasOwnedDescriptors? And again, any(d.nativeOwnership == 'owned' for d in descriptors). r=me hasNativeOwnership = any(
Attachment #748166 - Flags: review?(bzbarsky) → review+
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.