mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Fix leak of transactions. b=174123 r=jfrancis sr=kin a=rjesup
This commit is contained in:
parent
4390c6484e
commit
84f5669319
@ -492,13 +492,12 @@ nsEditor::Do(nsITransaction *aTxn)
|
||||
|
||||
if (mTxnMgr)
|
||||
{
|
||||
nsITransaction *topTxn = 0;
|
||||
result = mTxnMgr->PeekUndoStack(&topTxn);
|
||||
nsCOMPtr<nsITransaction> topTxn;
|
||||
result = mTxnMgr->PeekUndoStack(getter_AddRefs(topTxn));
|
||||
if (NS_FAILED(result)) return result;
|
||||
if (topTxn)
|
||||
{
|
||||
plcTxn = nsnull;
|
||||
topTxn->QueryInterface(NS_GET_IID(nsIAbsorbingTransaction), getter_AddRefs(plcTxn));
|
||||
plcTxn = do_QueryInterface(topTxn);
|
||||
if (plcTxn)
|
||||
{
|
||||
// there is a palceholder transaction on top of the undo stack. It is
|
||||
|
Loading…
Reference in New Issue
Block a user