summaryrefslogtreecommitdiff
path: root/layout
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2022-04-15 08:30:05 -0500
committertrav90 <travawine@palemoon.org>2022-04-15 08:30:05 -0500
commitd430c6398bf6bd1122f401aec7937a2ad0df99a5 (patch)
treed95ca61959104562efc0012c93873f1b92e276a7 /layout
parent39ba93e1d72e3e88633a13a31abbaa1035fe7ee5 (diff)
downloaduxp-d430c6398bf6bd1122f401aec7937a2ad0df99a5.tar.gz
Issue #1818 - Part 1: remove a number of old GCC hacks.
Diffstat (limited to 'layout')
-rw-r--r--layout/style/nsCSSParser.cpp39
1 files changed, 27 insertions, 12 deletions
diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp
index b409bfed7e..720a123d51 100644
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -9843,7 +9843,22 @@ CSSParserImpl::ParseGridLine(nsCSSValue& aValue)
// Make the contained value be defined even though we really want a
// Nothing here. This works around an otherwise difficult to avoid
// Memcheck false positive when this is compiled by gcc-5.3 -O2.
- // See bug 1301856.
+ // The problem is that gcc 5.4 and later, when using high
+ // optimization, inline Maybe::{isSome,ref} here
+ //
+ // if (integer.isSome() && integer.ref() < 0) {
+ //
+ // and then proceed to evaluate the expression right-to-left, as if it
+ // had been written
+ //
+ // integer.ref() < 0 && integer.isSome()
+ //
+ // This is a legitimate transformation because gcc presumably can prove
+ // via dataflow analysis that integer.isSome() is false whenever integer.ref()
+ // is undefined, so the overall expression result is still defined.
+ // Valgrind/Memcheck assumes that all conditional branches in the program
+ // are important, and that assumption is deeply wired in, so there is no
+ // easy way to avoid the warning apart from to force-initialise |integer|.
integer.emplace(0);
integer.reset();
#endif
@@ -15314,17 +15329,17 @@ CSSParserImpl::ParseFontFeatureSettings(nsCSSValue& aValue)
return true;
}
-bool
-CSSParserImpl::ParseFontVariationSettings(nsCSSValue& aValue)
-{
- // TODO: Actually implement this.
-
- // This stub is here because websites insist on considering this
- // very hardware-dependent and O.S.-variable low-level font-control
- // as a "critical feature" which it isn't as there is 0 guarantee
- // that font variation settings are supported or honored by any
- // operating system used by the client.
- return true;
+bool
+CSSParserImpl::ParseFontVariationSettings(nsCSSValue& aValue)
+{
+ // TODO: Actually implement this.
+
+ // This stub is here because websites insist on considering this
+ // very hardware-dependent and O.S.-variable low-level font-control
+ // as a "critical feature" which it isn't as there is 0 guarantee
+ // that font variation settings are supported or honored by any
+ // operating system used by the client.
+ return true;
}
bool