mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
fixed some UMR's due to mRefCnt being uninitialized. This fixes some memory leaks.
This commit is contained in:
parent
a71561f847
commit
666e4a3c97
@ -30,6 +30,7 @@ NS_IMPL_RELEASE(EditTxn)
|
||||
// note that aEditor is not refcounted
|
||||
EditTxn::EditTxn()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
nsresult EditTxn::Do(void)
|
||||
|
@ -470,24 +470,6 @@ nsEditor::Commit(PRBool aCtrlKey)
|
||||
|
||||
//BEGIN nsEditor Private methods
|
||||
|
||||
|
||||
nsresult
|
||||
nsEditor::GetCurrentNode(nsIDOMNode ** aNode)
|
||||
{
|
||||
if (!aNode)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
if (!mDoc)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
/* If no node set, get first text node */
|
||||
nsCOMPtr<nsIDOMElement> docNode;
|
||||
|
||||
if (NS_SUCCEEDED(mDoc->GetDocumentElement(getter_AddRefs(docNode))))
|
||||
{
|
||||
return docNode->QueryInterface(kIDOMNodeIID,(void **) aNode);
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsEditor::GetFirstNodeOfType(nsIDOMNode *aStartNode, const nsString &aTag, nsIDOMNode **aResult)
|
||||
{
|
||||
|
@ -147,17 +147,13 @@ public:
|
||||
|
||||
/*BEGIN private methods used by the implementations of the above functions*/
|
||||
|
||||
/** GetCurrentNode ADDREFFS and will get the current node from selection.
|
||||
* now it simply returns the first node in the dom
|
||||
* @param nsIDOMNode **aNode is the return location of the dom node
|
||||
*/
|
||||
nsresult GetCurrentNode(nsIDOMNode ** aNode);
|
||||
|
||||
/** GetFirstTextNode ADDREFFS and will get the next available text node from the passed
|
||||
* in node parameter it can also return NS_ERROR_FAILURE if no text nodes are available
|
||||
* now it simply returns the first node in the dom
|
||||
* @param nsIDOMNode *aNode is the node to start looking from
|
||||
* @param nsIDOMNode **aRetNode is the return location of the text dom node
|
||||
*
|
||||
* NOTE: this method will probably be removed.
|
||||
*/
|
||||
nsresult GetFirstTextNode(nsIDOMNode *aNode, nsIDOMNode **aRetNode);
|
||||
|
||||
|
@ -42,6 +42,7 @@ NS_IMPL_RELEASE(nsEditorKeyListener)
|
||||
|
||||
nsEditorKeyListener::nsEditorKeyListener()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
|
||||
@ -338,6 +339,7 @@ NS_IMPL_RELEASE(nsEditorMouseListener)
|
||||
|
||||
nsEditorMouseListener::nsEditorMouseListener()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,6 +30,7 @@ NS_IMPL_RELEASE(EditTxn)
|
||||
// note that aEditor is not refcounted
|
||||
EditTxn::EditTxn()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
}
|
||||
|
||||
nsresult EditTxn::Do(void)
|
||||
|
Loading…
Reference in New Issue
Block a user