diff --git a/dom/bindings/Bindings.conf b/dom/bindings/Bindings.conf index 41ede924a884..4724365b366d 100644 --- a/dom/bindings/Bindings.conf +++ b/dom/bindings/Bindings.conf @@ -44,22 +44,6 @@ # Always true for worker descriptors for non-callback # interfaces. Defaults to true for non-worker non-callback # descriptors. -# * nativeOwnership: Describes how the native object is held. 3 possible -# types: worker object ('worker'), non-refcounted object -# ('owned'), refcounted object ('refcounted'). -# Non-refcounted objects need to inherit from -# mozilla::dom::NonRefcountedDOMObject and preferably use -# MOZ_COUNT_CTOR/MOZ_COUNT_DTOR in their -# constructor/destructor so they participate in leak -# logging. -# This mostly determines how the finalizer releases the -# binding's hold on the native object. For a worker object -# it'll call Release, for a non-refcounted object it'll -# call delete through XPConnect's deferred finalization -# mechanism, for a refcounted object it'll call Release -# through XPConnect's deferred finalization mechanism. -# 'worker' opts into old style worker models. Defaults to -# 'refcounted'. # # The following fields are either a string, an array (defaults to an empty # array) or a dictionary with three possible keys (all, getterOnly and @@ -1227,17 +1211,14 @@ DOMInterfaces = { }, 'TextDecoder': { - 'nativeOwnership': 'owned', 'wrapperCache': False }, 'TextEncoder': { - 'nativeOwnership': 'owned', 'wrapperCache': False }, 'TextMetrics': { - 'nativeOwnership': 'owned', 'wrapperCache': False }, @@ -1592,7 +1573,6 @@ DOMInterfaces = { 'XPathExpression': { 'wrapperCache': False, - 'nativeOwnership': 'owned', }, 'XSLTProcessor': { diff --git a/dom/bindings/Configuration.py b/dom/bindings/Configuration.py index e3a85ff306b7..1930d6e82113 100644 --- a/dom/bindings/Configuration.py +++ b/dom/bindings/Configuration.py @@ -456,11 +456,6 @@ class Descriptor(DescriptorProvider): iface.setUserData('hasProxyDescendant', True) iface = iface.parent - self.nativeOwnership = desc.get('nativeOwnership', 'refcounted') - if not self.nativeOwnership in ('owned', 'refcounted'): - raise TypeError("Descriptor for %s has unrecognized value (%s) " - "for nativeOwnership" % - (self.interface.identifier.name, self.nativeOwnership)) if desc.get('wantsQI', None) != None: self._wantsQI = desc.get('wantsQI', None) self.wrapperCache = (not self.interface.isCallback() and diff --git a/dom/bindings/NonRefcountedDOMObject.h b/dom/bindings/NonRefcountedDOMObject.h index fa931bd69756..d27ae13bb31d 100644 --- a/dom/bindings/NonRefcountedDOMObject.h +++ b/dom/bindings/NonRefcountedDOMObject.h @@ -12,12 +12,12 @@ namespace mozilla { namespace dom { -// Natives for DOM classes with 'owned' as the value for nativeOwnership in -// Bindings.conf need to inherit from this class. +// Natives for DOM classes that aren't refcounted need to inherit from this +// class. // If you're seeing objects of this class leak then natives for one of the DOM -// classes with 'owned' as the value for nativeOwnership in Bindings.conf is -// leaking. If the native for that class has MOZ_COUNT_CTOR/DTOR in its -// constructor/destructor then it should show up in the leak log too. +// classes inheriting from it is leaking. If the native for that class has +// MOZ_COUNT_CTOR/DTOR in its constructor/destructor then it should show up in +// the leak log too. class NonRefcountedDOMObject { protected: