[Webkit-unassigned] [Bug 181742] REGRESSION (r226385?): Crash in com.apple.WebCore: WebCore::MediaQueryEvaluator::evaluate const + 32

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 17 12:45:13 PST 2018


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

David Kilzer (:ddkilzer) <ddkilzer at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #331494|review?                     |review+
              Flags|                            |

--- Comment #3 from David Kilzer (:ddkilzer) <ddkilzer at webkit.org> ---
Comment on attachment 331494
  --> https://bugs.webkit.org/attachment.cgi?id=331494
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=331494&action=review

r=me, but maybe you want a review from Dean Jackson or another area expert.

> Source/WebCore/css/MediaQueryEvaluator.cpp:778
> +    if (!m_document)
> +        return m_fallbackResult;
> +
> +    Document& document = *m_document;
> +    auto* frame = document.frame();
> +    if (!frame || !frame->view() || !m_style)
>          return m_fallbackResult;

You could move the "!m_style" check to the first if statement to avoid a small amount of work:

    if (!m_document || !m_style)
        return m_fallbackResult;

-- 
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/20180117/82ca04ee/attachment.html>


More information about the webkit-unassigned mailing list