<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>159526</bug_id>
          
          <creation_ts>2016-07-07 15:22:20 -0700</creation_ts>
          <short_desc>Fix crash when sending failure message to closed WebProcess</short_desc>
          <delta_ts>2016-09-01 12:59:01 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=159739</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=159691</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=161494</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alex Christensen">achristensen</reporter>
          <assigned_to name="Alex Christensen">achristensen</assigned_to>
          <cc>cdumez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1208825</commentid>
    <comment_count>0</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-07-07 15:22:20 -0700</bug_when>
    <thetext>Fix crash when sending failure message to closed WebProcess</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1208827</commentid>
    <comment_count>1</comment_count>
      <attachid>283064</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-07-07 15:23:19 -0700</bug_when>
    <thetext>Created attachment 283064
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1208830</commentid>
    <comment_count>2</comment_count>
      <attachid>283064</attachid>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2016-07-07 15:28:24 -0700</bug_when>
    <thetext>Comment on attachment 283064
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=283064&amp;action=review

Please explain how this could be testable if we had HTTP tests in TestWebKitAPI

&gt; Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp:409
&gt; +    } else if (messageSenderConnection())
&gt; +        messageSenderConnection()-&gt;send(Messages::WebResourceLoader::DidFailResourceLoad(error), 0, 0);

} else if (auto* connection = messageSenderConnection())
    connection-&gt;send(Messages::WebResourceLoader::DidFailResourceLoad(error), 0, 0);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1208848</commentid>
    <comment_count>3</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-07-07 15:43:34 -0700</bug_when>
    <thetext>https://trac.webkit.org/changeset/202939</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1208860</commentid>
    <comment_count>4</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2016-07-07 16:00:45 -0700</bug_when>
    <thetext>Followed up in https://trac.webkit.org/changeset/202940</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1210734</commentid>
    <comment_count>5</comment_count>
      <attachid>283064</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-07-13 14:57:38 -0700</bug_when>
    <thetext>Comment on attachment 283064
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=283064&amp;action=review

&gt;&gt; Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp:409
&gt;&gt; +        messageSenderConnection()-&gt;send(Messages::WebResourceLoader::DidFailResourceLoad(error), 0, 0);
&gt; 
&gt; } else if (auto* connection = messageSenderConnection())
&gt;     connection-&gt;send(Messages::WebResourceLoader::DidFailResourceLoad(error), 0, 0);

I don&apos;t think messageSenderConnection() can return null unless |this| has been destroyed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1210741</commentid>
    <comment_count>6</comment_count>
      <attachid>283064</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2016-07-13 15:02:17 -0700</bug_when>
    <thetext>Comment on attachment 283064
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=283064&amp;action=review

&gt;&gt;&gt; Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp:409
&gt;&gt;&gt; +        messageSenderConnection()-&gt;send(Messages::WebResourceLoader::DidFailResourceLoad(error), 0, 0);
&gt;&gt; 
&gt;&gt; } else if (auto* connection = messageSenderConnection())
&gt;&gt;     connection-&gt;send(Messages::WebResourceLoader::DidFailResourceLoad(error), 0, 0);
&gt; 
&gt; I don&apos;t think messageSenderConnection() can return null unless |this| has been destroyed.

My bet is that we were getting here with a destroyed NetworkResourceLoader because of https://bugs.webkit.org/show_bug.cgi?id=159691</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>283064</attachid>
            <date>2016-07-07 15:23:19 -0700</date>
            <delta_ts>2016-07-07 15:28:24 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-159526-20160707152246.patch</filename>
            <type>text/plain</type>
            <size>1556</size>
            <attacher name="Alex Christensen">achristensen</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
S2l0Mi9DaGFuZ2VMb2cJKHJldmlzaW9uIDIwMjkzNikKKysrIFNvdXJjZS9XZWJLaXQyL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE2IEBACisyMDE2LTA3LTA3ICBBbGV4IENo
cmlzdGVuc2V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nlc3MvTmV0d29ya1Jlc291cmNlTG9hZGVyLmNwcAkod29y
a2luZyBjb3B5KQpAQCAtNDA1LDggKzQwNSw4IEBAIHZvaWQgTmV0d29ya1Jlc291cmNlTG9hZGVy
OjpkaWRGYWlsTG9hZGkKICAgICBpZiAoaXNTeW5jaHJvbm91cygpKSB7CiAgICAgICAgIG1fc3lu
Y2hyb25vdXNMb2FkRGF0YS0+ZXJyb3IgPSBlcnJvcjsKICAgICAgICAgc2VuZFJlcGx5VG9TeW5j
aHJvbm91c1JlcXVlc3QoKm1fc3luY2hyb25vdXNMb2FkRGF0YSwgbnVsbHB0cik7Ci0gICAgfSBl
bHNlCi0gICAgICAgIHNlbmQoTWVzc2FnZXM6OldlYlJlc291cmNlTG9hZGVyOjpEaWRGYWlsUmVz
b3VyY2VMb2FkKGVycm9yKSk7CisgICAgfSBlbHNlIGlmIChtZXNzYWdlU2VuZGVyQ29ubmVjdGlv
bigpKQorICAgICAgICBtZXNzYWdlU2VuZGVyQ29ubmVjdGlvbigpLT5zZW5kKE1lc3NhZ2VzOjpX
ZWJSZXNvdXJjZUxvYWRlcjo6RGlkRmFpbFJlc291cmNlTG9hZChlcnJvciksIDAsIDApOwogCiAg
ICAgY2xlYW51cCgpOwogfQo=
</data>
<flag name="review"
          id="306793"
          type_id="1"
          status="+"
          setter="beidson"
    />
          </attachment>
      

    </bug>

</bugzilla>