зеркало из https://github.com/mozilla/pjs.git
Fix for bug 406106 (Large leak with XSLTProcessor.setParameter). r/sr/a=sicking.
This commit is contained in:
Родитель
ef71b2956d
Коммит
b772a22172
|
@ -264,6 +264,10 @@ public:
|
||||||
NS_ADDREF(*aValue);
|
NS_ADDREF(*aValue);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
nsIVariant* getValue()
|
||||||
|
{
|
||||||
|
return mValue;
|
||||||
|
}
|
||||||
void setValue(nsIVariant* aValue)
|
void setValue(nsIVariant* aValue)
|
||||||
{
|
{
|
||||||
NS_ASSERTION(aValue, "setting variablevalue to null");
|
NS_ASSERTION(aValue, "setting variablevalue to null");
|
||||||
|
@ -288,9 +292,26 @@ private:
|
||||||
* txMozillaXSLTProcessor
|
* txMozillaXSLTProcessor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
NS_IMPL_ADDREF(txMozillaXSLTProcessor)
|
NS_IMPL_CYCLE_COLLECTION_CLASS(txMozillaXSLTProcessor)
|
||||||
NS_IMPL_RELEASE(txMozillaXSLTProcessor)
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(txMozillaXSLTProcessor)
|
||||||
NS_INTERFACE_MAP_BEGIN(txMozillaXSLTProcessor)
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mEmbeddedStylesheetRoot)
|
||||||
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mSource)
|
||||||
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mPrincipal)
|
||||||
|
tmp->mVariables.clear();
|
||||||
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||||
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(txMozillaXSLTProcessor)
|
||||||
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mEmbeddedStylesheetRoot)
|
||||||
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mSource)
|
||||||
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mPrincipal)
|
||||||
|
txOwningExpandedNameMap<txIGlobalParameter>::iterator iter(tmp->mVariables);
|
||||||
|
while (iter.next()) {
|
||||||
|
cb.NoteXPCOMChild(static_cast<txVariable*>(iter.value())->getValue());
|
||||||
|
}
|
||||||
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||||
|
|
||||||
|
NS_IMPL_CYCLE_COLLECTING_ADDREF(txMozillaXSLTProcessor)
|
||||||
|
NS_IMPL_CYCLE_COLLECTING_RELEASE(txMozillaXSLTProcessor)
|
||||||
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(txMozillaXSLTProcessor)
|
||||||
NS_INTERFACE_MAP_ENTRY(nsIXSLTProcessor)
|
NS_INTERFACE_MAP_ENTRY(nsIXSLTProcessor)
|
||||||
NS_INTERFACE_MAP_ENTRY(nsIXSLTProcessorObsolete)
|
NS_INTERFACE_MAP_ENTRY(nsIXSLTProcessorObsolete)
|
||||||
NS_INTERFACE_MAP_ENTRY(nsIXSLTProcessorPrivate)
|
NS_INTERFACE_MAP_ENTRY(nsIXSLTProcessorPrivate)
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#include "txExpandedNameMap.h"
|
#include "txExpandedNameMap.h"
|
||||||
#include "txNamespaceMap.h"
|
#include "txNamespaceMap.h"
|
||||||
#include "nsIJSNativeInitializer.h"
|
#include "nsIJSNativeInitializer.h"
|
||||||
|
#include "nsCycleCollectionParticipant.h"
|
||||||
|
|
||||||
class nsIDOMNode;
|
class nsIDOMNode;
|
||||||
class nsIPrincipal;
|
class nsIPrincipal;
|
||||||
|
@ -88,7 +89,9 @@ public:
|
||||||
~txMozillaXSLTProcessor();
|
~txMozillaXSLTProcessor();
|
||||||
|
|
||||||
// nsISupports interface
|
// nsISupports interface
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||||
|
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(txMozillaXSLTProcessor,
|
||||||
|
nsIXSLTProcessor)
|
||||||
|
|
||||||
// nsIXSLTProcessor interface
|
// nsIXSLTProcessor interface
|
||||||
NS_DECL_NSIXSLTPROCESSOR
|
NS_DECL_NSIXSLTPROCESSOR
|
||||||
|
|
Загрузка…
Ссылка в новой задаче