<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - NetworkProcess: DNS prefetch happens in the Web Process"
href="https://bugs.webkit.org/show_bug.cgi?id=147824#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - NetworkProcess: DNS prefetch happens in the Web Process"
href="https://bugs.webkit.org/show_bug.cgi?id=147824">bug 147824</a>
from <span class="vcard"><a class="email" href="mailto:cgarcia@igalia.com" title="Carlos Garcia Campos <cgarcia@igalia.com>"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=147824#c6">comment #6</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=258713&action=diff" name="attach_258713" title="Updated patch">attachment 258713</a> <a href="attachment.cgi?id=258713&action=edit" title="Updated patch">[details]</a></span>
> Updated patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=258713&action=review">https://bugs.webkit.org/attachment.cgi?id=258713&action=review</a>
>
> >> Source/WebCore/html/HTMLAnchorElement.cpp:257
> >> + document().frame()->loader().client().prefetchDNS(document().completeURL(parsedURL).host());
> >
> > I think that the document can have a null frame here, in which case we'll crash. Please add a test case for this, and fix the crash if I'm right.
>
> That's why I added && document().frame() to the previous if condition
>
> >> Source/WebCore/loader/LinkLoader.cpp:101
> >> + document.frame()->loader().client().prefetchDNS(href.host());
> >
> > Ditto.
>
> Ditto.
>
> >> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:632
> >> + m_page->mainFrame().loader().client().prefetchDNS(downcast<Element>(*node).absoluteLinkURL().host());
> >
> > Can m_page be null here?
>
> m_page is created in the constructor, and deleted in ::close(), so if we are
> here we should have a valid page, I can add an assert</span >
I could also use node->document().frame()->loader().client() checking frame() is not null, since we are already checking node is not null.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>