Bug 1096328 - Remove nativeOwnership from Bindings.conf, remove the now unused nativeOwnership property. r=bz.

This commit is contained in:
Peter Van der Beken 2014-11-01 15:25:55 +01:00
parent ddd5950fa5
commit 3bcb836898
3 changed files with 5 additions and 30 deletions

View File

@ -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': {

View File

@ -468,11 +468,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

View File

@ -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: