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)
|
if (mTxnMgr)
|
||||||
{
|
{
|
||||||
nsITransaction *topTxn = 0;
|
nsCOMPtr<nsITransaction> topTxn;
|
||||||
result = mTxnMgr->PeekUndoStack(&topTxn);
|
result = mTxnMgr->PeekUndoStack(getter_AddRefs(topTxn));
|
||||||
if (NS_FAILED(result)) return result;
|
if (NS_FAILED(result)) return result;
|
||||||
if (topTxn)
|
if (topTxn)
|
||||||
{
|
{
|
||||||
plcTxn = nsnull;
|
plcTxn = do_QueryInterface(topTxn);
|
||||||
topTxn->QueryInterface(NS_GET_IID(nsIAbsorbingTransaction), getter_AddRefs(plcTxn));
|
|
||||||
if (plcTxn)
|
if (plcTxn)
|
||||||
{
|
{
|
||||||
// there is a palceholder transaction on top of the undo stack. It is
|
// there is a palceholder transaction on top of the undo stack. It is
|
||||||
|
Loading…
Reference in New Issue
Block a user