[Webkit-unassigned] [Bug 221097] Null dereference in DocumentLoader::commitData()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 2 13:07:55 PST 2021
https://bugs.webkit.org/show_bug.cgi?id=221097
--- Comment #7 from Julian Gonzalez <julian_a_gonzalez at apple.com> ---
(In reply to Darin Adler from comment #6)
> Comment on attachment 418763 [details]
> 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.
Thanks! That sounds like a great idea, but trying to use it I'm running into a compiler error:
/<...>/OpenSource/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:1150:12: error: use of undeclared identifier 'MediaDocument'; did you mean 'endOfDocument'?
if (is<MediaDocument>(m_frame->coreFrame()->document()))
Which makes me think the MediaDocument type isn't exposed. Trying to include "MediaDocument.h" or <WebCore/MediaDocument.h> however, doesn't work from this file. Any suggestions?
--
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/0e5834dc/attachment-0001.htm>
More information about the webkit-unassigned
mailing list