[Webkit-unassigned] [Bug 236923] [GPU Process] Test failures with no/bad colored boxes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 15 11:32:33 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=236923

Said Abou-Hallawa <sabouhallawa at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sabouhallawa at apple.com

--- Comment #3 from Said Abou-Hallawa <sabouhallawa at apple.com> ---
The crash in orb-paintserver.html is fixed. It was happening because of infinite recursion. It was happening because of this new function 

inline bool operator==(const std::variant<Ref<Gradient>, Ref<Pattern>>& a, const std::variant<Ref<Gradient>, Ref<Pattern>>& b)
{
    return WTF::switchOn(a,
        [&] (const Ref<Gradient>& aGradient) {
            if (auto* bGradient = std::get_if<Ref<Gradient>>(&b))
                return aGradient == *bGradient;
            return false;
        },
        [&] (const Ref<Pattern>& aPattern) {
            if (auto* bPattern = std::get_if<Ref<Pattern>>(&b))
                return aPattern == *bPattern;
            return false;
        }
    );
}

The equality in "return aPattern == *bPattern;" was causing the recursion. Ref<Pattern> was converted to std::variant<Ref<Gradient>, Ref<Pattern>> so the function was calling itself infinitely. The fix is not to compare Ref<Pattern> but to compare the raw pointers: "return aPattern.ptr() == bPattern->ptr();"

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220315/76cea17b/attachment-0001.htm>


More information about the webkit-unassigned mailing list