Bug 1180036 - Replace the warning that anonymous nodes should not be in child lists with an assert plus whitelisting of known-OK cases. r=bz
authorEric Rahm <erahm@mozilla.com>
Fri, 24 Jul 2015 09:47:51 -0700
changeset 254518 cc03e18f0438a92863e8871fdffe8efa52c9f4a6
parent 254517 4dd38d6866edcce430d4da4a8b0b03a985ecaff8
child 254519 3caca87b85d7a74941ba7d93e3cd3a7611788c81
push id62779
push usererahm@mozilla.com
push dateFri, 24 Jul 2015 16:48:02 +0000
treeherdermozilla-inbound@cc03e18f0438 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1180036
milestone42.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 1180036 - Replace the warning that anonymous nodes should not be in child lists with an assert plus whitelisting of known-OK cases. r=bz
layout/base/RestyleManager.cpp
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -1465,17 +1465,18 @@ void
 RestyleManager::RestyleForRemove(Element* aContainer,
                                  nsIContent* aOldChild,
                                  nsIContent* aFollowingSibling)
 {
   if (aOldChild->IsRootOfAnonymousSubtree()) {
     // This should be an assert, but this is called incorrectly in
     // nsHTMLEditor::DeleteRefToAnonymousNode and the assertions were clogging
     // up the logs.  Make it an assert again when that's fixed.
-    NS_WARNING("anonymous nodes should not be in child lists (bug 439258)");
+    MOZ_ASSERT(aOldChild->GetProperty(nsGkAtoms::restylableAnonymousNode),
+               "anonymous nodes should not be in child lists (bug 439258)");
   }
   uint32_t selectorFlags =
     aContainer ? (aContainer->GetFlags() & NODE_ALL_SELECTOR_FLAGS) : 0;
   if (selectorFlags == 0)
     return;
 
   if (selectorFlags & NODE_HAS_EMPTY_SELECTOR) {
     // see whether we need to restyle the container