[webkit-reviews] review granted: [Bug 221097] Null dereference in DocumentLoader::commitData() : [Attachment 418763] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Feb 1 16:28:10 PST 2021
Darin Adler <darin at apple.com> has granted Julian Gonzalez
<julian_a_gonzalez at apple.com>'s request for review:
Bug 221097: Null dereference in DocumentLoader::commitData()
https://bugs.webkit.org/show_bug.cgi?id=221097
Attachment 418763: Patch
https://bugs.webkit.org/attachment.cgi?id=418763&action=review
--- Comment #6 from Darin Adler <darin at apple.com> ---
Comment on attachment 418763
--> https://bugs.webkit.org/attachment.cgi?id=418763
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=418763&action=review
> Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:1151
> + if (m_frame->coreFrame()->document() &&
m_frame->coreFrame()->document()->isMediaDocument())
>
loader->cancelMainResourceLoad(pluginWillHandleLoadError(loader->response()));
Even better way to write it:
if (is<MediaDocument>(m_frame->coreFrame()->document()))
The template function has the null check built in.
More information about the webkit-reviews
mailing list