summaryrefslogtreecommitdiffstats
path: root/editor/libeditor/EditorBase.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-02-08 12:06:30 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-08 12:06:30 +0100
commit44cd9f2a915a4879371c5e0b059acc3e5a2378b0 (patch)
tree8cb1a4758b16d9caae55f525b73f5fca3824b4f7 /editor/libeditor/EditorBase.cpp
parentf8d1830b530cd553d788b3579d41725d35c4da7f (diff)
parentb62fce0dc0c77a5788c331db32b3996e4020e2a5 (diff)
downloadUXP-44cd9f2a915a4879371c5e0b059acc3e5a2378b0.tar
UXP-44cd9f2a915a4879371c5e0b059acc3e5a2378b0.tar.gz
UXP-44cd9f2a915a4879371c5e0b059acc3e5a2378b0.tar.lz
UXP-44cd9f2a915a4879371c5e0b059acc3e5a2378b0.tar.xz
UXP-44cd9f2a915a4879371c5e0b059acc3e5a2378b0.zip
Merge branch 'ported-upstream'
Diffstat (limited to 'editor/libeditor/EditorBase.cpp')
-rw-r--r--editor/libeditor/EditorBase.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/libeditor/EditorBase.cpp b/editor/libeditor/EditorBase.cpp
index 13505b2d3..b793f39b8 100644
--- a/editor/libeditor/EditorBase.cpp
+++ b/editor/libeditor/EditorBase.cpp
@@ -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;
}