Changeset 202939 in webkit


Ignore:
Timestamp:
Jul 7, 2016 3:42:43 PM (8 years ago)
Author:
achristensen@apple.com
Message:

Fix crash when sending failure message to closed WebProcess
https://bugs.webkit.org/show_bug.cgi?id=159526
<rdar://problem/26767037>

Reviewed by Brady Eidson.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::didFailLoading):
Check to see if there is a connection before using it to send a message.
Sometimes it was null.
I think this could be tested if we had real network loading from TestWebKitAPI
by cancelling slow loads and closing WebProcesses around the same time, but no such infrastructure exists yet.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r202930 r202939  
     12016-07-07  Alex Christensen  <achristensen@webkit.org>
     2
     3        Fix crash when sending failure message to closed WebProcess
     4        https://bugs.webkit.org/show_bug.cgi?id=159526
     5        <rdar://problem/26767037>
     6
     7        Reviewed by Brady Eidson.
     8
     9        * NetworkProcess/NetworkResourceLoader.cpp:
     10        (WebKit::NetworkResourceLoader::didFailLoading):
     11        Check to see if there is a connection before using it to send a message.
     12        Sometimes it was null.
     13        I think this could be tested if we had real network loading from TestWebKitAPI
     14        by cancelling slow loads and closing WebProcesses around the same time, but no such infrastructure exists yet.
     15
    1162016-07-07  Alex Christensen  <achristensen@webkit.org>
    217
  • trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp

    r202511 r202939  
    406406        m_synchronousLoadData->error = error;
    407407        sendReplyToSynchronousRequest(*m_synchronousLoadData, nullptr);
    408     } else
    409         send(Messages::WebResourceLoader::DidFailResourceLoad(error));
     408    } else if (auto* connection = messageSenderConnection())
     409        connection->send(Messages::WebResourceLoader::DidFailResourceLoad(error), 0, 0);
    410410
    411411    cleanup();
Note: See TracChangeset for help on using the changeset viewer.