Bug 1366142: Ignore reentrant change hints without primary frame. r=heycam
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sat, 20 May 2017 14:35:37 +0200
changeset 359797 0665f9f01eb2afa3494edbd4b96f65320695044f
parent 359796 fdf1b68b652fd195ca01a21d37274f9ee64722e6
child 359798 4eb036bf55f0f95d042dbc0ac52fd01fe84eb17a
push id31857
push userphilringnalda@gmail.com
push dateSun, 21 May 2017 20:00:29 +0000
treeherdermozilla-central@cf9f9525e4d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1366142
milestone55.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 1366142: Ignore reentrant change hints without primary frame. r=heycam MozReview-Commit-ID: 4bF7M0KMhNL
layout/base/ServoRestyleManager.cpp
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -573,16 +573,24 @@ ServoRestyleManager::DoProcessPendingRes
     // processing existing ones. We redirect those into a secondary queue and
     // iterate until there's nothing left.
     ReentrantChangeList newChanges;
     mReentrantChanges = &newChanges;
     while (!currentChanges.IsEmpty()) {
       ProcessRestyledFrames(currentChanges);
       MOZ_ASSERT(currentChanges.IsEmpty());
       for (ReentrantChange& change: newChanges)  {
+        if (!(change.mHint & nsChangeHint_ReconstructFrame) &&
+            !change.mContent->GetPrimaryFrame()) {
+          // SVG Elements post change hints without ensuring that the primary
+          // frame will be there after that (see bug 1366142).
+          //
+          // Just ignore those, since we can't really process them.
+          continue;
+        }
         currentChanges.AppendChange(change.mContent->GetPrimaryFrame(),
                                     change.mContent, change.mHint);
       }
       newChanges.Clear();
     }
     mReentrantChanges = nullptr;
 
     IncrementRestyleGeneration();