зеркало из https://github.com/mozilla/gecko-dev.git
Bug 848386 part 1. Don't preserve our wrapper until we have one so unforgeable property setup won't try to preserve it. r=peterv
This commit is contained in:
Родитель
55ab35ff80
Коммит
a804a3767b
|
@ -865,8 +865,11 @@ class CGAddPropertyHook(CGAbstractClassHook):
|
|||
preserveArgs = "reinterpret_cast<nsISupports*>(self), self"
|
||||
else:
|
||||
preserveArgs = "self, self, NS_CYCLE_COLLECTION_PARTICIPANT(%s)" % self.descriptor.nativeType
|
||||
return """ nsContentUtils::PreserveWrapper(%s);
|
||||
return true;""" % preserveArgs
|
||||
return (" // We don't want to preserve if we don't have a wrapper.\n"
|
||||
" if (self->GetWrapperPreserveColor()) {\n"
|
||||
" nsContentUtils::PreserveWrapper(%s);\n"
|
||||
" }\n"
|
||||
" return true;" % preserveArgs)
|
||||
|
||||
def DeferredFinalizeSmartPtr(descriptor):
|
||||
if descriptor.nativeOwnership == 'owned':
|
||||
|
|
Загрузка…
Ссылка в новой задаче