[webkit-reviews] review granted: [Bug 211544] Add some missing null checks for DocumentLoader : [Attachment 398696] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu May 7 07:33:15 PDT 2020
Anders Carlsson <andersca at apple.com> has granted Darin Adler
<darin at apple.com>'s request for review:
Bug 211544: Add some missing null checks for DocumentLoader
https://bugs.webkit.org/show_bug.cgi?id=211544
Attachment 398696: Patch
https://bugs.webkit.org/attachment.cgi?id=398696&action=review
--- Comment #3 from Anders Carlsson <andersca at apple.com> ---
Comment on attachment 398696
--> https://bugs.webkit.org/attachment.cgi?id=398696
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=398696&action=review
> Source/WebCore/loader/FrameLoader.cpp:2173
> + auto dl = m_documentLoader;
I would have renamed this to documentLoader.
> Source/WebCore/loader/FrameLoader.cpp:2226
> + m_documentLoader->writer().setMIMEType(dl->responseMIMEType());
Should this use dl instead of m_documentLoader? (Maybe there's a chance that
m_documentLoader is replaced mid-function?)
> Source/WebCore/loader/HistoryController.cpp:417
> + const URL& historyURL = m_frame.loader().documentLoader() ?
m_frame.loader().documentLoader()->urlForHistory() : URL { };
I'd change this to no longer hold a const reference, since urlForHistory()
returns a const&, it will always be copied anyway AFAICT.
More information about the webkit-reviews
mailing list