Bug 393329: Clean up destructors in xslt code. Patch by peterv. r/sr/a=sicking

This commit is contained in:
jonas@sicking.cc 2007-09-05 21:02:40 -07:00
parent 137e743d41
commit 1e10ddb95c
51 changed files with 4 additions and 214 deletions

View File

@ -94,8 +94,6 @@ public:
**/
SimpleErrorObserver(ostream& errStream);
virtual ~SimpleErrorObserver() {};
/**
* Notifies this Error observer of a new error aRes
**/

View File

@ -246,10 +246,6 @@ txListIterator::txListIterator(txList* list) {
atEndOfList = MB_FALSE;
} //-- txListIterator
txListIterator::~txListIterator() {
//-- overrides default destructor to do nothing
} //-- ~txListIterator
/**
* Adds the Object pointer to the txList pointed to by this txListIterator.
* The Object pointer is inserted as the next item in the txList

View File

@ -60,7 +60,7 @@ public:
/**
* txList destructor, object references will not be deleted.
**/
virtual ~txList();
~txList();
/**
* Returns the object located at the given index. This may
@ -143,11 +143,6 @@ public:
**/
txListIterator(txList* list);
/**
* Destructor, destroys a given instance of a txListIterator
**/
~txListIterator();
/**
* Adds the Object pointer to the txList pointed to by this txListIterator.
* The Object pointer is inserted as the next item in the txList

View File

@ -78,9 +78,6 @@ public:
txOptionEntry(const void* aKey) : PLDHashCStringEntry(aKey)
{
}
~txOptionEntry()
{
}
nsCStringArray mValues;
};

View File

@ -55,10 +55,6 @@ Attr::Attr(nsIAtom *aPrefix, nsIAtom *aLocalName, PRInt32 aNamespaceID,
{
}
Attr::~Attr()
{
}
//
//Not implemented anymore, return null as an error.
//

View File

@ -103,8 +103,6 @@ class Node : public TxObject
NOTATION_NODE
};
virtual ~Node() {}
//Read functions
virtual nsresult getNodeName(nsAString& aName) const = 0;
virtual nsresult getNodeValue(nsAString& aValue) = 0;
@ -247,9 +245,6 @@ public:
txIDEntry(const void* aKey) : PLDHashStringEntry(aKey), mElement(nsnull)
{
}
~txIDEntry()
{
}
Element* mElement;
};
DECL_DHASH_WRAPPER(txIDMap, txIDEntry, nsAString&)
@ -295,8 +290,6 @@ class Document : public NodeDefinition
class Element : public NodeDefinition
{
public:
virtual ~Element();
NamedNodeMap* getAttributes();
nsresult appendAttributeNS(nsIAtom *aPrefix, nsIAtom *aLocalName,
@ -341,9 +334,6 @@ class Element : public NodeDefinition
class Attr : public NodeDefinition
{
public:
virtual ~Attr();
// Node manipulation functions
Node* appendChild(Node* newChild);
//txXPathNode functions override
@ -383,8 +373,6 @@ class Attr : public NodeDefinition
class ProcessingInstruction : public NodeDefinition
{
public:
~ProcessingInstruction();
//txXPathNode functions override
MBool getLocalName(nsIAtom** aLocalName);

View File

@ -53,14 +53,6 @@ Element::Element(nsIAtom *aPrefix, nsIAtom *aLocalName, PRInt32 aNamespaceID,
{
}
//
// This element is being destroyed, so destroy all attributes stored
// in the mAttributes NamedNodeMap.
//
Element::~Element()
{
}
Node* Element::appendChild(Node* newChild)
{
switch (newChild->getNodeType())

View File

@ -58,13 +58,6 @@ ProcessingInstruction::ProcessingInstruction(nsIAtom *theTarget,
{
}
//
//Release the mLocalName
//
ProcessingInstruction::~ProcessingInstruction()
{
}
//
//ProcessingInstruction nodes can not have any children, so just return null
//from all child manipulation functions.

View File

@ -77,10 +77,6 @@ public:
{
}
~txExpandedName()
{
}
nsresult init(const nsAString& aQName, txNamespaceMap* aResolver,
MBool aUseDefault);

View File

@ -73,10 +73,6 @@ public:
{
}
virtual ~nsXPath1SchemeNSResolver()
{
}
NS_DECL_ISUPPORTS
NS_DECL_NSIDOMXPATHNSRESOLVER
@ -129,14 +125,6 @@ nsXPath1SchemeNSResolver::LookupNamespaceURI(const nsAString &aPrefix,
}
// nsXPath1SchemeProcessor
nsXPath1SchemeProcessor::nsXPath1SchemeProcessor()
{
}
nsXPath1SchemeProcessor::~nsXPath1SchemeProcessor()
{
}
NS_IMPL_ISUPPORTS1(nsXPath1SchemeProcessor, nsIXPointerSchemeProcessor)
/**

View File

@ -48,9 +48,6 @@
class nsXPath1SchemeProcessor : public nsIXPointerSchemeProcessor
{
public:
nsXPath1SchemeProcessor();
virtual ~nsXPath1SchemeProcessor();
NS_DECL_ISUPPORTS
NS_DECL_NSIXPOINTERSCHEMEPROCESSOR

View File

@ -56,9 +56,6 @@ class nsXPathEvaluator : public nsIDOMXPathEvaluator,
{
public:
nsXPathEvaluator(nsISupports *aOuter);
virtual ~nsXPathEvaluator()
{
}
nsresult Init();

View File

@ -67,10 +67,6 @@ nsXPathExpression::nsXPathExpression(nsAutoPtr<Expr>& aExpression,
{
}
nsXPathExpression::~nsXPathExpression()
{
}
NS_IMETHODIMP
nsXPathExpression::Evaluate(nsIDOMNode *aContextNode,
PRUint16 aType,

View File

@ -57,7 +57,6 @@ class nsXPathExpression : public nsIDOMXPathExpression,
public:
nsXPathExpression(nsAutoPtr<Expr>& aExpression, txResultRecycler* aRecycler,
nsIDOMDocument *aDocument);
virtual ~nsXPathExpression();
// nsISupports interface
NS_DECL_ISUPPORTS
@ -87,10 +86,6 @@ private:
{
}
~EvalContextImpl()
{
}
nsresult getError()
{
return mLastError;

View File

@ -55,10 +55,6 @@ nsXPathNSResolver::nsXPathNSResolver(nsIDOMNode* aNode)
NS_ASSERTION(mNode, "Need a node to resolve namespaces.");
}
nsXPathNSResolver::~nsXPathNSResolver()
{
}
NS_IMETHODIMP
nsXPathNSResolver::LookupNamespaceURI(const nsAString & aPrefix,
nsAString & aResult)

View File

@ -51,7 +51,6 @@ class nsXPathNSResolver : public nsIDOMXPathNSResolver
{
public:
nsXPathNSResolver(nsIDOMNode* aNode);
virtual ~nsXPathNSResolver();
// nsISupports interface
NS_DECL_ISUPPORTS

View File

@ -48,14 +48,6 @@ NS_INTERFACE_MAP_BEGIN(nsXPathNamespace)
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(XPathNamespace)
NS_INTERFACE_MAP_END
nsXPathNamespace::nsXPathNamespace()
{
}
nsXPathNamespace::~nsXPathNamespace()
{
}
/* readonly attribute DOMString nodeName; */
NS_IMETHODIMP nsXPathNamespace::GetNodeName(nsAString & aNodeName)
{

View File

@ -54,9 +54,6 @@
class nsXPathNamespace : public nsIDOMXPathNamespace
{
public:
nsXPathNamespace();
virtual ~nsXPathNamespace();
// nsISupports interface
NS_DECL_ISUPPORTS

View File

@ -97,7 +97,7 @@ class nsXPathResult : public nsIDOMXPathResult,
{
public:
nsXPathResult();
virtual ~nsXPathResult();
~nsXPathResult();
// nsISupports interface
NS_DECL_ISUPPORTS

View File

@ -53,8 +53,6 @@ public:
mContextNode(aContextNode),
mContextSet(aContextNodeSet)
{}
~txForwardContext()
{}
TX_DECL_EVAL_CONTEXT;

View File

@ -139,10 +139,6 @@ public:
class txIEvalContext : public txIMatchContext
{
public:
virtual ~txIEvalContext()
{
}
/*
* Get the context node.
*/

View File

@ -69,10 +69,6 @@ txXPathTreeWalker::txXPathTreeWalker(const txXPathNode& aNode)
{
}
txXPathTreeWalker::~txXPathTreeWalker()
{
}
void
txXPathTreeWalker::moveToRoot()
{

View File

@ -50,9 +50,6 @@ public:
: mContextSet(aContextNodeSet), mPosition(0), mInner(aContext)
{
}
virtual ~txNodeSetContext()
{
}
// Iteration over the given NodeSet
MBool hasNext()

View File

@ -51,8 +51,6 @@ public:
{
NS_ASSERTION(aContext, "txIMatchContext must be given");
}
~txSingleNodeContext()
{}
nsresult getVariable(PRInt32 aNamespace, nsIAtom* aLName,
txAExprResult*& aResult)

View File

@ -53,10 +53,6 @@ txXPathTreeWalker::txXPathTreeWalker(const txXPathNode& aNode)
{
}
txXPathTreeWalker::~txXPathTreeWalker()
{
}
#define INNER mPosition.mInner
void

View File

@ -73,7 +73,6 @@ class txXPathTreeWalker
public:
txXPathTreeWalker(const txXPathTreeWalker& aOther);
explicit txXPathTreeWalker(const txXPathNode& aNode);
~txXPathTreeWalker();
PRBool getAttr(nsIAtom* aLocalName, PRInt32 aNSID, nsAString& aValue) const;
PRInt32 getNamespaceID() const;

View File

@ -179,10 +179,6 @@ txBufferingHandler::txBufferingHandler() : mCanAddAttribute(PR_FALSE)
mBuffer = new txResultBuffer();
}
txBufferingHandler::~txBufferingHandler()
{
}
nsresult
txBufferingHandler::attribute(nsIAtom* aPrefix, nsIAtom* aLocalName,
nsIAtom* aLowercaseLocalName, PRInt32 aNsID,

View File

@ -74,7 +74,6 @@ class txBufferingHandler : public txAXMLEventHandler
{
public:
txBufferingHandler();
~txBufferingHandler();
TX_DECL_TXAXMLEVENTHANDLER

View File

@ -196,10 +196,6 @@ txHTMLOutput::txHTMLOutput(txOutputFormat* aFormat, ostream* aOut)
mUseEmptyElementShorthand = PR_FALSE;
}
txHTMLOutput::~txHTMLOutput()
{
}
nsresult
txHTMLOutput::attribute(const nsAString& aName, const PRInt32 aNsID,
const nsAString& aValue)

View File

@ -45,7 +45,6 @@ class txHTMLOutput : public txXMLOutput
{
public:
txHTMLOutput(txOutputFormat* aFormat, ostream* aOut);
~txHTMLOutput();
/**
* Init/release table with shorthands.

View File

@ -98,7 +98,6 @@ class txStylesheetSink : public nsIXMLContentSink,
{
public:
txStylesheetSink(txStylesheetCompiler* aCompiler, nsIParser* aParser);
virtual ~txStylesheetSink();
NS_DECL_ISUPPORTS
NS_DECL_NSIEXPATSINK
@ -136,10 +135,6 @@ txStylesheetSink::txStylesheetSink(txStylesheetCompiler* aCompiler,
mListener = do_QueryInterface(aParser);
}
txStylesheetSink::~txStylesheetSink()
{
}
NS_IMPL_ISUPPORTS7(txStylesheetSink,
nsIXMLContentSink,
nsIContentSink,
@ -464,7 +459,6 @@ public:
txCompileObserver(txMozillaXSLTProcessor* aProcessor,
nsILoadGroup* aLoadGroup,
nsIPrincipal* aCallerPrincipal);
virtual ~txCompileObserver();
TX_DECL_ACOMPILEOBSERVER;
@ -493,10 +487,6 @@ txCompileObserver::txCompileObserver(txMozillaXSLTProcessor* aProcessor,
{
}
txCompileObserver::~txCompileObserver()
{
}
nsrefcnt
txCompileObserver::AddRef()
{
@ -709,7 +699,6 @@ class txSyncCompileObserver : public txACompileObserver
public:
txSyncCompileObserver(txMozillaXSLTProcessor* aProcessor,
nsIPrincipal* aCallerPrincipal);
virtual ~txSyncCompileObserver();
TX_DECL_ACOMPILEOBSERVER;
@ -726,10 +715,6 @@ txSyncCompileObserver::txSyncCompileObserver(txMozillaXSLTProcessor* aProcessor,
{
}
txSyncCompileObserver::~txSyncCompileObserver()
{
}
nsrefcnt
txSyncCompileObserver::AddRef()
{

View File

@ -70,10 +70,6 @@ txMozillaTextOutput::txMozillaTextOutput(nsIDOMDocumentFragment* aDest)
mDocument = mTextParent->GetOwnerDoc();
}
txMozillaTextOutput::~txMozillaTextOutput()
{
}
nsresult
txMozillaTextOutput::attribute(nsIAtom* aPrefix, nsIAtom* aLocalName,
nsIAtom* aLowercaseLocalName,

View File

@ -58,7 +58,6 @@ public:
nsIDOMDocument* aResultDocument,
nsITransformObserver* aObserver);
txMozillaTextOutput(nsIDOMDocumentFragment* aDest);
virtual ~txMozillaTextOutput();
TX_DECL_TXAXMLEVENTHANDLER
TX_DECL_TXAOUTPUTXMLEVENTHANDLER

View File

@ -132,10 +132,6 @@ txMozillaXMLOutput::txMozillaXMLOutput(txOutputFormat* aFormat,
}
}
txMozillaXMLOutput::~txMozillaXMLOutput()
{
}
nsresult
txMozillaXMLOutput::attribute(nsIAtom* aPrefix,
nsIAtom* aLocalName,
@ -1001,10 +997,6 @@ txTransformNotifier::txTransformNotifier()
{
}
txTransformNotifier::~txTransformNotifier()
{
}
NS_IMPL_ISUPPORTS2(txTransformNotifier,
nsIScriptLoaderObserver,
nsICSSLoaderObserver)

View File

@ -64,7 +64,6 @@ class txTransformNotifier : public nsIScriptLoaderObserver,
{
public:
txTransformNotifier();
virtual ~txTransformNotifier();
NS_DECL_ISUPPORTS
NS_DECL_NSISCRIPTLOADEROBSERVER
@ -103,7 +102,6 @@ public:
txMozillaXMLOutput(txOutputFormat* aFormat,
nsIDOMDocumentFragment* aFragment,
PRBool aNoFixup);
virtual ~txMozillaXMLOutput();
TX_DECL_TXAXMLEVENTHANDLER
TX_DECL_TXAOUTPUTXMLEVENTHANDLER

View File

@ -85,10 +85,6 @@ public:
{
}
virtual ~txToDocHandlerFactory()
{
}
TX_DECL_TXAOUTPUTHANDLERFACTORY
private:
@ -106,10 +102,6 @@ public:
{
}
virtual ~txToFragmentHandlerFactory()
{
}
TX_DECL_TXAOUTPUTHANDLERFACTORY
private:

View File

@ -85,7 +85,7 @@ public:
/**
* Default destructor for txMozillaXSLTProcessor
*/
virtual ~txMozillaXSLTProcessor();
~txMozillaXSLTProcessor();
// nsISupports interface
NS_DECL_ISUPPORTS

View File

@ -45,10 +45,6 @@ txResultTreeFragment::txResultTreeFragment(nsAutoPtr<txResultBuffer>& aBuffer)
{
}
txResultTreeFragment::~txResultTreeFragment()
{
}
short txResultTreeFragment::getResultType()
{
return RESULT_TREE_FRAGMENT;
@ -93,14 +89,6 @@ nsresult txResultTreeFragment::flushToHandler(txAXMLEventHandler** aHandler)
return mBuffer->flushToHandler(aHandler);
}
txRtfHandler::txRtfHandler()
{
}
txRtfHandler::~txRtfHandler()
{
}
nsresult
txRtfHandler::getAsRTF(txAExprResult** aResult)
{

View File

@ -48,7 +48,6 @@ class txResultTreeFragment : public txAExprResult
{
public:
txResultTreeFragment(nsAutoPtr<txResultBuffer>& aBuffer);
~txResultTreeFragment();
TX_DECL_EXPRRESULT
@ -73,9 +72,6 @@ private:
class txRtfHandler : public txBufferingHandler
{
public:
txRtfHandler();
virtual ~txRtfHandler();
nsresult getAsRTF(txAExprResult** aResult);
nsresult endDocument(nsresult aResult);

View File

@ -61,10 +61,6 @@ public:
{
}
virtual ~txStandaloneHandlerFactory()
{
}
TX_DECL_TXAOUTPUTHANDLERFACTORY
private:

View File

@ -44,10 +44,6 @@ txTextHandler::txTextHandler(MBool aOnlyText) : mLevel(0),
{
}
txTextHandler::~txTextHandler()
{
}
nsresult
txTextHandler::attribute(nsIAtom* aPrefix, nsIAtom* aLocalName,
nsIAtom* aLowercaseLocalName, PRInt32 aNsID,

View File

@ -46,7 +46,6 @@ class txTextHandler : public txAXMLEventHandler
{
public:
txTextHandler(MBool aOnlyText);
virtual ~txTextHandler();
TX_DECL_TXAXMLEVENTHANDLER

View File

@ -44,10 +44,6 @@ txTextOutput::txTextOutput(ostream* aOut)
{
}
txTextOutput::~txTextOutput()
{
}
nsresult
txTextOutput::attribute(const nsAString& aName,
const PRInt32 aNsID,

View File

@ -45,7 +45,6 @@ class txTextOutput : public txAOutputXMLEventHandler
{
public:
txTextOutput(ostream* aOut);
~txTextOutput();
TX_DECL_TXAXMLEVENTHANDLER
TX_DECL_TXAOUTPUTXMLEVENTHANDLER

View File

@ -127,7 +127,7 @@ public:
class txStripSpaceItem : public txToplevelItem
{
public:
virtual ~txStripSpaceItem();
~txStripSpaceItem();
TX_DECL_TOPLEVELITEM

View File

@ -47,10 +47,6 @@ txUnknownHandler::txUnknownHandler(txExecutionState* aEs)
{
}
txUnknownHandler::~txUnknownHandler()
{
}
nsresult
txUnknownHandler::endDocument(nsresult aResult)
{

View File

@ -48,7 +48,6 @@ class txUnknownHandler : public txBufferingHandler
{
public:
txUnknownHandler(txExecutionState* aEs);
virtual ~txUnknownHandler();
nsresult endDocument(nsresult aResult);
nsresult startElement(nsIAtom* aPrefix, nsIAtom* aName,

View File

@ -61,10 +61,6 @@ txXMLOutput::txXMLOutput(txOutputFormat* aFormat, ostream* aOut)
mOutputFormat.setFromDefaults();
}
txXMLOutput::~txXMLOutput()
{
}
nsresult
txXMLOutput::attribute(const nsAString& aName,
const PRInt32 aNsID,

View File

@ -94,7 +94,6 @@ class txXMLOutput : public txAOutputXMLEventHandler
{
public:
txXMLOutput(txOutputFormat* aFormat, ostream* aOut);
virtual ~txXMLOutput();
static const int DEFAULT_INDENT;

View File

@ -70,10 +70,6 @@ txResultStringComparator::txResultStringComparator(MBool aAscending,
#endif
}
txResultStringComparator::~txResultStringComparator()
{
}
#ifndef TX_EXE
nsresult txResultStringComparator::init(const nsAFlatString& aLanguage)
{
@ -264,10 +260,6 @@ txResultNumberComparator::txResultNumberComparator(MBool aAscending)
mAscending = aAscending ? 1 : -1;
}
txResultNumberComparator::~txResultNumberComparator()
{
}
nsresult
txResultNumberComparator::createSortableValue(Expr *aExpr,
txIEvalContext *aContext,

View File

@ -81,7 +81,6 @@ class txResultStringComparator : public txXPathResultComparator
public:
txResultStringComparator(MBool aAscending, MBool aUpperFirst,
const nsAFlatString& aLanguage);
virtual ~txResultStringComparator();
int compareValues(TxObject* aVal1, TxObject* aVal2);
nsresult createSortableValue(Expr *aExpr, txIEvalContext *aContext,
@ -120,7 +119,6 @@ class txResultNumberComparator : public txXPathResultComparator
{
public:
txResultNumberComparator(MBool aAscending);
virtual ~txResultNumberComparator();
int compareValues(TxObject* aVal1, TxObject* aVal2);
nsresult createSortableValue(Expr *aExpr, txIEvalContext *aContext,