Title: [204807] releases/WebKitGTK/webkit-2.12/Source/WebKit2
Revision
204807
Author
[email protected]
Date
2016-08-23 04:16:02 -0700 (Tue, 23 Aug 2016)

Log Message

Merge r202939 - 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.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.12/Source/WebKit2/ChangeLog (204806 => 204807)


--- releases/WebKitGTK/webkit-2.12/Source/WebKit2/ChangeLog	2016-08-23 11:14:49 UTC (rev 204806)
+++ releases/WebKitGTK/webkit-2.12/Source/WebKit2/ChangeLog	2016-08-23 11:16:02 UTC (rev 204807)
@@ -1,3 +1,18 @@
+2016-07-07  Alex Christensen  <[email protected]>
+
+        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.
+
 2016-07-12  Chris Dumez  <[email protected]>
 
         [WK2] Protect against bad database data in LocalStorageDatabase::importItems()

Modified: releases/WebKitGTK/webkit-2.12/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (204806 => 204807)


--- releases/WebKitGTK/webkit-2.12/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp	2016-08-23 11:14:49 UTC (rev 204806)
+++ releases/WebKitGTK/webkit-2.12/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp	2016-08-23 11:16:02 UTC (rev 204807)
@@ -377,8 +377,8 @@
     if (isSynchronous()) {
         m_synchronousLoadData->error = error;
         sendReplyToSynchronousRequest(*m_synchronousLoadData, nullptr);
-    } else
-        send(Messages::WebResourceLoader::DidFailResourceLoad(error));
+    } else if (auto* connection = messageSenderConnection())
+        connection->send(Messages::WebResourceLoader::DidFailResourceLoad(error), 0, 0);
 
     cleanup();
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to