Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: d77aeedaad489af1a0b49016acc044ec08caafca https://github.com/WebKit/WebKit/commit/d77aeedaad489af1a0b49016acc044ec08caafca Author: Vitaly Dyachkov <vit...@igalia.com> Date: 2024-05-21 (Tue, 21 May 2024)
Changed paths: M Source/WebCore/css/parser/CSSPropertyParserConsumer+MetaResolver.h Log Message: ----------- [GTK][WPE]: Regression (278519@main): build error with gcc 12.3.0 https://bugs.webkit.org/show_bug.cgi?id=274072 Reviewed by Sam Weinig. To parse a CSS time value in `CSSPropertyParserHelpers::consumeTime()`, we call `CSSPrimitiveValueResolver<TimeRaw>::consumeAndResolve()` static method. This method consumes a range of tokens, creates a `MetaConsumeResult`, which is essentially a `std::variant<TimeRow, UnevaluatedCalc<TimeRaw>`, and passes it to `CSSPrimitiveValueResolver<TimeRaw>::resolve()`. Then `WTF::switchOn()` is used to get the `consumeResult` value. Beacuse `UnevaluatedCalc` is a struct that includes a `Ref<CSSCalcValue>` `calc`, and it is passed by value to `WTF::switchOn()` lambda, GCC believes that it's there is a possibility of the `calc` value being destroyed but still reachable. Passing `consumeResult` value by reference fixes the warning and reduces reference-counting churn. * Source/WebCore/css/parser/CSSPropertyParserConsumer+MetaResolver.h: (WebCore::CSSPropertyParserHelpers::MetaResolver::resolve): Canonical link: https://commits.webkit.org/279040@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes