Bug 1531693 - Relax the assertion for another editor handling the composition to take account of cycle collection. r=masayuki
authorMark Banner <standard8@mozilla.com>
Tue, 26 Mar 2019 18:01:01 +0000
changeset 466137 d8dcb951f8318bbbca0f7bbc007cd6e764d3483b
parent 466136 1fed9bd30f04a3c729458d6bdc5824d92dec7453
child 466138 0969fd6383cea58141d70fbb2d0895ccb476af6c
push id35761
push userdvarga@mozilla.com
push dateTue, 26 Mar 2019 21:49:44 +0000
treeherdermozilla-central@0969fd6383ce [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1531693
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1531693 - Relax the assertion for another editor handling the composition to take account of cycle collection. r=masayuki Differential Revision: https://phabricator.services.mozilla.com/D24529
dom/events/TextComposition.cpp
--- a/dom/events/TextComposition.cpp
+++ b/dom/events/TextComposition.cpp
@@ -646,17 +646,17 @@ void TextComposition::StartHandlingCompo
   mEditorBaseWeak = do_GetWeakReference(static_cast<nsIEditor*>(aEditorBase));
 }
 
 void TextComposition::EndHandlingComposition(EditorBase* aEditorBase) {
   MOZ_RELEASE_ASSERT(!mTabParent);
 
 #ifdef DEBUG
   RefPtr<EditorBase> editorBase = GetEditorBase();
-  MOZ_ASSERT(editorBase == aEditorBase,
+  MOZ_ASSERT(!editorBase || editorBase == aEditorBase,
              "Another editor handled the composition?");
 #endif  // #ifdef DEBUG
   mEditorBaseWeak = nullptr;
 }
 
 already_AddRefed<EditorBase> TextComposition::GetEditorBase() const {
   nsCOMPtr<nsIEditor> editor = do_QueryReferent(mEditorBaseWeak);
   RefPtr<EditorBase> editorBase = static_cast<EditorBase*>(editor.get());