mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Edit transactions should store their editor instance with strong reference
Edit transactions should store their editor instance with a strong reference, and they should be released when the editor is destroyed.
This commit is contained in:
parent
2f312335f3
commit
fbab5890eb
23 changed files with 150 additions and 53 deletions
|
|
@ -466,6 +466,13 @@ EditorBase::PreDestroy(bool aDestroyingFrames)
|
|||
mSpellcheckCheckboxState = eTriUnset;
|
||||
mRootElement = nullptr;
|
||||
|
||||
// Transaction may grab this instance. Therefore, they should be released
|
||||
// here for stopping the circular reference with this instance.
|
||||
if (mTxnMgr) {
|
||||
mTxnMgr->Clear();
|
||||
mTxnMgr = nullptr;
|
||||
}
|
||||
|
||||
mDidPreDestroy = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue