diff options
author | Makoto Kato <m_kato@ga2.so-net.ne.jp> | 2018-02-22 12:11:53 -0500 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-03-14 11:07:35 +0100 |
commit | 958307f8acecde8d13f45bd47b6368a278b1bda6 (patch) | |
tree | a1d479f92743430201ad6f219214e37dd78d69c9 /editor | |
parent | f953f052bf00dd65b0993a809f7df90511527123 (diff) | |
download | aura-central-958307f8acecde8d13f45bd47b6368a278b1bda6.tar.gz |
Bug 1437087 - Call Disconnect on Unlink of cycle collector. r=masayuki, a=RyanVM
Diffstat (limited to 'editor')
-rw-r--r-- | editor/libeditor/EditorBase.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/editor/libeditor/EditorBase.cpp b/editor/libeditor/EditorBase.cpp index b793f39b8..0c4a2a41d 100644 --- a/editor/libeditor/EditorBase.cpp +++ b/editor/libeditor/EditorBase.cpp @@ -175,7 +175,14 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(EditorBase) NS_IMPL_CYCLE_COLLECTION_UNLINK(mEditorObservers) NS_IMPL_CYCLE_COLLECTION_UNLINK(mDocStateListeners) NS_IMPL_CYCLE_COLLECTION_UNLINK(mEventTarget) - NS_IMPL_CYCLE_COLLECTION_UNLINK(mEventListener) + + if (tmp->mEventListener) { + EditorEventListener* listener = + reinterpret_cast<EditorEventListener*>(tmp->mEventListener.get()); + listener->Disconnect(); + tmp->mEventListener = nullptr; + } + NS_IMPL_CYCLE_COLLECTION_UNLINK(mSavedSel); NS_IMPL_CYCLE_COLLECTION_UNLINK(mRangeUpdater); NS_IMPL_CYCLE_COLLECTION_UNLINK_END |