Title: [215567] trunk/Source/WebKit2
Revision
215567
Author
[email protected]
Date
2017-04-20 12:13:24 -0700 (Thu, 20 Apr 2017)

Log Message

Fix assertions in webProcessProxyFromConnection
https://bugs.webkit.org/show_bug.cgi?id=171025
<rdar://problem/31184073>

Patch by Alex Christensen <[email protected]> on 2017-04-20
Reviewed by Brady Eidson.

* UIProcess/WebProcessPool.cpp:
(WebKit::webProcessProxyFromConnection):
If we have a Connection, then we have a valid process attached to that connection,
unless it's a Connection to a different type of child process.
Calling ChildProcessProxy::connection on other web processes that are in State::Launching,
then we get an assertion.  Luckily, ChildProcessProxy::hasConnection was introduced in r210861
for this reason.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (215566 => 215567)


--- trunk/Source/WebKit2/ChangeLog	2017-04-20 18:23:29 UTC (rev 215566)
+++ trunk/Source/WebKit2/ChangeLog	2017-04-20 19:13:24 UTC (rev 215567)
@@ -1,3 +1,19 @@
+2017-04-20  Alex Christensen  <[email protected]>
+
+        Fix assertions in webProcessProxyFromConnection
+        https://bugs.webkit.org/show_bug.cgi?id=171025
+        <rdar://problem/31184073>
+
+        Reviewed by Brady Eidson.
+
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::webProcessProxyFromConnection):
+        If we have a Connection, then we have a valid process attached to that connection,
+        unless it's a Connection to a different type of child process.
+        Calling ChildProcessProxy::connection on other web processes that are in State::Launching,
+        then we get an assertion.  Luckily, ChildProcessProxy::hasConnection was introduced in r210861
+        for this reason.
+
 2017-04-20  Brent Fulgham  <[email protected]>
 
         [WK2][macOS] Allow iokit-get-properties for IOAudioControlValue

Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (215566 => 215567)


--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp	2017-04-20 18:23:29 UTC (rev 215566)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp	2017-04-20 19:13:24 UTC (rev 215567)
@@ -1357,11 +1357,11 @@
 static WebProcessProxy* webProcessProxyFromConnection(IPC::Connection& connection, const Vector<RefPtr<WebProcessProxy>>& processes)
 {
     for (auto& process : processes) {
-        if (process->connection() == &connection)
+        if (process->hasConnection(connection))
             return process.get();
     }
 
-    // FIXME: Can this ever return null?
+    ASSERT_NOT_REACHED();
     return nullptr;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to