Bug 1509958, bug 1508734 - Give up on an assert that doesn't hold because of bug 1510208. r=smaug
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 27 Nov 2018 13:12:44 +0000
changeset 504745 8517649053392155b1812af4500c23ef4876f52f
parent 504744 82bdbaebd7fe83f063aaf10ee9643fe66630f46a
child 504746 ca2e3366674c0d8a619e478d35bc895dd9c86a02
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1509958, 1508734, 1510208
milestone65.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 1509958, bug 1508734 - Give up on an assert that doesn't hold because of bug 1510208. r=smaug Can't land the test-case from bug 1510208 as a crashtest because it needs you to move the mouse around, and as such it doesn't crash in the crashtest harness. Differential Revision: https://phabricator.services.mozilla.com/D13054
layout/base/PresShell.cpp
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -2096,19 +2096,22 @@ PresShell::FireResizeEvent()
 }
 
 static nsIContent* GetNativeAnonymousSubtreeRoot(nsIContent* aContent)
 {
   if (!aContent || !aContent->IsInNativeAnonymousSubtree()) {
     return nullptr;
   }
   auto* current = aContent;
+  // FIXME(emilio): This should not need to worry about current being null, but
+  // editor removes nodes in native anonymous subtrees, and we don't clean nodes
+  // from the current event content stack from ContentRemoved, so it can
+  // actually happen, see bug 1510208.
   while (current && !current->IsRootOfNativeAnonymousSubtree()) {
     current = current->GetFlattenedTreeParent();
-    MOZ_DIAGNOSTIC_ASSERT(current, "How?");
   }
   return current;
 }
 
 void
 nsIPresShell::NativeAnonymousContentRemoved(nsIContent* aAnonContent)
 {
   MOZ_ASSERT(aAnonContent->IsRootOfNativeAnonymousSubtree());