From 0e05cb9630c4ac6bea719692d9bd64fd2e26f721 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Wed, 12 Jun 2024 22:31:23 +0200 Subject: [PATCH] [layout] Initialize PerSpanData members mBaseline and mReflowInput. We null-initialize all of the other pointer members in NewPerSpanData; we should do the same for these ones, for consistency & robustness. (In practice, the callers end up initializing these members before reading them anyway, so it's been benign that we weren't initializing them. But better for safety & futureproofing to have them reliably initialized.) --- layout/generic/nsLineLayout.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layout/generic/nsLineLayout.cpp b/layout/generic/nsLineLayout.cpp index 579c4ae0b0..aa465d3584 100644 --- a/layout/generic/nsLineLayout.cpp +++ b/layout/generic/nsLineLayout.cpp @@ -401,8 +401,10 @@ nsLineLayout::NewPerSpanData() psd->mFrame = nullptr; psd->mFirstFrame = nullptr; psd->mLastFrame = nullptr; + psd->mReflowInput = nullptr; psd->mContainsFloat = false; psd->mHasNonemptyContent = false; + psd->mBaseline = nullptr; #ifdef DEBUG outerLineLayout->mSpansAllocated++;