<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#c6">Comment # 6</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&#64;igalia.com" title="Carlos Garcia Campos &lt;cgarcia&#64;igalia.com&gt;"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=258713&amp;action=diff" name="attach_258713" title="Updated patch">attachment 258713</a> <a href="attachment.cgi?id=258713&amp;action=edit" title="Updated patch">[details]</a></span>
Updated patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=258713&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=258713&amp;action=review</a>

<span class="quote">&gt;&gt; Source/WebCore/html/HTMLAnchorElement.cpp:257
&gt;&gt; +                    document().frame()-&gt;loader().client().prefetchDNS(document().completeURL(parsedURL).host());
&gt; 
&gt; 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.</span >

That's why I added &amp;&amp; document().frame() to the previous if condition

<span class="quote">&gt;&gt; Source/WebCore/loader/LinkLoader.cpp:101
&gt;&gt; +            document.frame()-&gt;loader().client().prefetchDNS(href.host());
&gt; 
&gt; Ditto.</span >

Ditto.

<span class="quote">&gt;&gt; Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:632
&gt;&gt; +        m_page-&gt;mainFrame().loader().client().prefetchDNS(downcast&lt;Element&gt;(*node).absoluteLinkURL().host());
&gt; 
&gt; Can m_page be null here?</span >

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