Bug 1343388 - Don't write to undisplayed contents map cache during servo traversal. r=emilio
authorBobby Holley <bobbyholley@gmail.com>
Tue, 28 Feb 2017 15:23:56 -0800
changeset 490858 5b8c22b505a48f78764e22ae720b9bda07853b33
parent 490857 d038d48f6be18cc97a3708f3c8a93e4bfb83b7c9
child 490859 2d3c0b4c3e4a91b549c71d87711449fae0133a5e
push id47245
push userbmo:sledru@mozilla.com
push dateWed, 01 Mar 2017 10:58:52 +0000
reviewersemilio
bugs1343388
milestone54.0a1
Bug 1343388 - Don't write to undisplayed contents map cache during servo traversal. r=emilio MozReview-Commit-ID: 732bV0X80Gk
layout/base/nsFrameManager.cpp
--- a/layout/base/nsFrameManager.cpp
+++ b/layout/base/nsFrameManager.cpp
@@ -722,17 +722,17 @@ nsFrameManagerBase::UndisplayedMap::GetE
   if (parentContent && nsContentUtils::IsContentInsertionPoint(parentContent)) {
     parentContent = parentContent->GetParent();
     // Change the caller's pointer for the parent content to be the insertion parent.
     *aParentContent = parentContent;
   }
 
   PLHashNumber hashCode = NS_PTR_TO_INT32(parentContent);
   PLHashEntry** entry = PL_HashTableRawLookup(mTable, hashCode, parentContent);
-  if (*entry) {
+  if (*entry && !ServoStyleSet::IsInServoTraversal()) {
     mLastLookup = entry;
   }
   return entry;
 }
 
 UndisplayedNode* 
 nsFrameManagerBase::UndisplayedMap::GetFirstNode(nsIContent* aParentContent)
 {