[Webkit-unassigned] [Bug 221097] Null dereference in DocumentLoader::commitData()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 1 16:28:10 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=221097

Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |darin at apple.com
 Attachment #418763|review?                     |review+
              Flags|                            |

--- 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210202/ec3585a6/attachment.htm>


More information about the webkit-unassigned mailing list