Bug 1382019 - stylo: Don't crash on null parent contexts in nsCSSFrameConstructor::AddFrameConstructionItemsInternal ; r=emilio a=crashfix CLOSED TREE
authorManish Goregaokar <manishearth@gmail.com>
Tue, 18 Jul 2017 15:14:21 -0700
changeset 369418 1b065ffd8a535a0ad4c39a912af18e948e6a42c1
parent 369417 dece50457378ac4934afe9fb3c2a8054e8894588
child 369495 1ba8ed71c08471ed9cf54f167a234eb6e285be54
child 369611 6f2529d0dccc15abc6eaf58f02b546c7bff1e92a
push id32197
push userkwierso@gmail.com
push dateTue, 18 Jul 2017 23:33:41 +0000
treeherdermozilla-central@1b065ffd8a53 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio, crashfix
bugs1382019
milestone56.0a1
first release with
nightly linux32
1b065ffd8a53 / 56.0a1 / 20170719100147 / files
nightly linux64
1b065ffd8a53 / 56.0a1 / 20170719100147 / files
nightly mac
1b065ffd8a53 / 56.0a1 / 20170719100145 / files
nightly win32
1b065ffd8a53 / 56.0a1 / 20170719030206 / files
nightly win64
1b065ffd8a53 / 56.0a1 / 20170719030206 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1382019 - stylo: Don't crash on null parent contexts in nsCSSFrameConstructor::AddFrameConstructionItemsInternal ; r=emilio a=crashfix CLOSED TREE MozReview-Commit-ID: 93fXjEnLVLI
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -5882,18 +5882,20 @@ nsCSSFrameConstructor::AddFrameConstruct
           ServoRestyleManager::ClearServoDataFromSubtree(element);
           styleSet->StyleNewSubtree(element);
 
           // Servo's should_traverse_children() in traversal.rs skips
           // styling descendants of elements with a -moz-binding the
           // first time. Thus call StyleNewChildren() again.
           styleSet->StyleNewChildren(element);
 
+          // Because of LazyComputeBehavior::Assert we never create a style
+          // context here, so it's fine to pass a null parent.
           styleContext =
-            styleSet->ResolveStyleFor(element, styleContext->GetParentAllowServo()->AsServo(),
+            styleSet->ResolveStyleFor(element, nullptr,
                                       LazyComputeBehavior::Assert);
         } else {
           styleContext =
             ResolveStyleContext(styleContext->GetParent(), aContent, &aState);
         }
 
         display = styleContext->StyleDisplay();
         aStyleContext = styleContext;