зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1096328 - Remove nativeOwnership from Bindings.conf, remove the now unused nativeOwnership property. r=bz.
--HG-- extra : rebase_source : a121c0061d1afec19beeecaf507da30ac027936c
This commit is contained in:
Родитель
2bd3fd551f
Коммит
eecdaa8a30
|
@ -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': {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Загрузка…
Ссылка в новой задаче