RESOLVED FIXED 218144
Add null checks and smart pointers in PDF and Plugin code
https://bugs.webkit.org/show_bug.cgi?id=218144
Summary Add null checks and smart pointers in PDF and Plugin code
Alex Christensen
Reported 2020-10-23 18:17:23 PDT
Add null checks and smart pointers in PDF and Plugin code
Attachments
Patch (29.90 KB, patch)
2020-10-23 18:29 PDT, Alex Christensen
ews-feeder: commit-queue-
Patch (29.91 KB, patch)
2020-10-23 18:40 PDT, Alex Christensen
no flags
Patch (30.90 KB, patch)
2020-10-26 10:48 PDT, Alex Christensen
no flags
Alex Christensen
Comment 1 2020-10-23 18:29:24 PDT
Alex Christensen
Comment 2 2020-10-23 18:40:02 PDT
youenn fablet
Comment 3 2020-10-26 10:40:38 PDT
Comment on attachment 412221 [details] 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&?
Alex Christensen
Comment 4 2020-10-26 10:46:12 PDT
Comment on attachment 412221 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=412221&action=review >> Source/WebKit/WebProcess/WebPage/WebFrame.h:160 >> + void setLoadListener(LoadListener* loadListener) { m_loadListener = makeWeakPtr(loadListener); } > > Could we pass a LoadListener&? nope, but I'll update the old call sites that call it with 0 to call it with nullptr.
Alex Christensen
Comment 5 2020-10-26 10:48:53 PDT
EWS
Comment 6 2020-10-26 11:41:02 PDT
Committed r268989: <https://trac.webkit.org/changeset/268989> All reviewed patches have been landed. Closing bug and clearing flags on attachment 412335 [details].
Radar WebKit Bug Importer
Comment 7 2020-10-26 11:42:18 PDT
David Kilzer (:ddkilzer)
Comment 8 2020-10-26 13:06:19 PDT
Note You need to log in before you can comment on or make changes to this bug.