Bug 1351205 - Skip debug check for Stylo in nsComputedDOMStyle::UpdateCurrentStyleSources().
The debug code calls nsStyleContext::GetParent(), which is invalid in stylo.
Let's skip it.
MozReview-Commit-ID: 5opMaSuyoNr
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -857,17 +857,17 @@ nsComputedDOMStyle::UpdateCurrentStyleSo
SetFrameStyleContext(mInnerFrame->StyleContext());
NS_ASSERTION(mStyleContext, "Frame without style context?");
}
}
if (!mStyleContext || mStyleContext->HasPseudoElementData()) {
#ifdef DEBUG
- if (mStyleContext) {
+ if (mStyleContext && mStyleContext->StyleSource().IsGeckoRuleNodeOrNull()) {
// We want to check that going through this path because of
// HasPseudoElementData is rare, because it slows us down a good
// bit. So check that we're really inside something associated
// with a pseudo-element that contains elements. (We also allow
// the element to be NAC, just in case some chrome JS calls
// getComputedStyle on a NAC-implemented pseudo.)
nsStyleContext* topWithPseudoElementData = mStyleContext;
while (topWithPseudoElementData->GetParent()->HasPseudoElementData()) {