[webkit-reviews] review granted: [Bug 181742] REGRESSION (r226385?): Crash in com.apple.WebCore: WebCore::MediaQueryEvaluator::evaluate const + 32 : [Attachment 331494] patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 17 12:45:13 PST 2018
David Kilzer (:ddkilzer) <ddkilzer at webkit.org> has granted Antti Koivisto
<koivisto at iki.fi>'s request for review:
Bug 181742: REGRESSION (r226385?): Crash in com.apple.WebCore:
WebCore::MediaQueryEvaluator::evaluate const + 32
https://bugs.webkit.org/show_bug.cgi?id=181742
Attachment 331494: patch
https://bugs.webkit.org/attachment.cgi?id=331494&action=review
--- 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;
More information about the webkit-reviews
mailing list