From 05d0cf7d47c86cd50679ac1c2bee6c8f0771558d Mon Sep 17 00:00:00 2001 From: Jeremy Andrews Date: Sat, 13 Aug 2022 11:32:33 -0500 Subject: [PATCH] Issue #1970 - Follow-up: Better fix for Unix that works on newer GCC. My previous fix apparently only worked with GCC 7. Having that return at the end doesn't seem to hurt anything on Windows, so I see no reason to ifdef it. I don't remember where I heard this, but I vaguely remember hearing that ending a function without a return statement may be undefined behavior that differs between compilers and operating systems. If so, that would explain why this has behaved so differently across platforms and compilers. --- layout/generic/ReflowInput.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layout/generic/ReflowInput.cpp b/layout/generic/ReflowInput.cpp index d76287de57..b9485c0c0c 100644 --- a/layout/generic/ReflowInput.cpp +++ b/layout/generic/ReflowInput.cpp @@ -2815,6 +2815,8 @@ nscoord ReflowInput::GetLineHeight() const { mFrame->StyleContext(), blockBSize, nsLayoutUtils::FontSizeInflationFor(mFrame)); + + return mLineHeight; } void ReflowInput::SetLineHeight(nscoord aLineHeight) {