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
This commit is contained in:
Emilio Cobos Álvarez 2018-06-12 17:21:29 -07:00
Родитель 1feab69ebb
Коммит 6deecdeacf
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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);