[webkit-reviews] review granted: [Bug 218144] Add null checks and smart pointers in PDF and Plugin code : [Attachment 412221] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 26 10:40:38 PDT 2020


youenn fablet <youennf at gmail.com> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 218144: Add null checks and smart pointers in PDF and Plugin code
https://bugs.webkit.org/show_bug.cgi?id=218144

Attachment 412221: Patch

https://bugs.webkit.org/attachment.cgi?id=412221&action=review




--- Comment #3 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 412221
  --> https://bugs.webkit.org/attachment.cgi?id=412221
Patch

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

> Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:620
> +	   Document* document = frame.coreFrame()->document();

auto

> Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:1855
> +    m_frame->page()->updatePDFHUDLocation(*this, frameForHUD());

Are we sure page is non null?

> Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:1922
>      LocalDefaultSystemAppearance localAppearance(page->useDarkAppearance());

Check page?

> Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:2302
> +    if (!m_frame)

Could do if (!m_frame || !m_frame->coreFrame()).

> Source/WebKit/WebProcess/WebPage/WebFrame.h:160
> +    void setLoadListener(LoadListener* loadListener) { m_loadListener =
makeWeakPtr(loadListener); }

Could we pass a LoadListener&?


More information about the webkit-reviews mailing list