From 6deecdeacf1b43b3b5f1c410fbf7e08f53cf868b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 12 Jun 2018 17:21:29 -0700 Subject: [PATCH] Bug 1458556: Release wallpaper for bug 1462401. r=xidorn Just avoid crashing if the element has no data, treat is as display: none. TakeChangeHint already returns wasRestyled = false, so we won't end up trying to reconstruct anything, and we don't set frame construction flags in nsCSSFrameConstructor so we won't traverse children either. MozReview-Commit-ID: 2gXmHSlj3Jw --HG-- extra : rebase_source : 9d95a4f3ee8fabc4d73a39699c677ba184061370 --- layout/base/RestyleManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp index 2ffc9854441e..f70582b774a3 100644 --- a/layout/base/RestyleManager.cpp +++ b/layout/base/RestyleManager.cpp @@ -2671,7 +2671,8 @@ RestyleManager::ProcessPostTraversal( "display: contents node has a frame, yet we didn't reframe it" " above?"); const bool isDisplayContents = - !styleFrame && Servo_Element_IsDisplayContents(aElement); + !styleFrame && aElement->HasServoData() && + Servo_Element_IsDisplayContents(aElement); if (isDisplayContents) { oldOrDisplayContentsStyle = aRestyleState.StyleSet().ResolveServoStyle(aElement);