Title: [167638] trunk/Source/WebKit2
Revision
167638
Author
[email protected]
Date
2014-04-21 17:23:04 -0700 (Mon, 21 Apr 2014)

Log Message

Don't try to use a null connection()->xpcConnection()
https://bugs.webkit.org/show_bug.cgi?id=131961

Reviewed by Dan Bernstein.

If running with -WebKit2UseXPCServiceForWebProcess NO, connection()->xpcConnection()
is null and xpc_connection_get_pid() would crash, so null-check the xpcConnection.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didFinishLaunching):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (167637 => 167638)


--- trunk/Source/WebKit2/ChangeLog	2014-04-22 00:15:35 UTC (rev 167637)
+++ trunk/Source/WebKit2/ChangeLog	2014-04-22 00:23:04 UTC (rev 167638)
@@ -1,3 +1,16 @@
+2014-04-21  Simon Fraser  <[email protected]>
+
+        Don't try to use a null connection()->xpcConnection()
+        https://bugs.webkit.org/show_bug.cgi?id=131961
+
+        Reviewed by Dan Bernstein.
+        
+        If running with -WebKit2UseXPCServiceForWebProcess NO, connection()->xpcConnection()
+        is null and xpc_connection_get_pid() would crash, so null-check the xpcConnection.
+
+        * UIProcess/Network/NetworkProcessProxy.cpp:
+        (WebKit::NetworkProcessProxy::didFinishLaunching):
+
 2014-04-21  Dan Bernstein  <[email protected]>
 
         WebKit part of <rdar://problem/16631323> Page::setDefersLoading doesn’t do anything when using the Network process

Modified: trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp (167637 => 167638)


--- trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp	2014-04-22 00:15:35 UTC (rev 167637)
+++ trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp	2014-04-22 00:23:04 UTC (rev 167638)
@@ -201,7 +201,8 @@
 #endif
     
 #if PLATFORM(IOS) && USE(XPC_SERVICES)
-    m_assertion = std::make_unique<ProcessAssertion>(xpc_connection_get_pid(connection()->xpcConnection()), AssertionState::Foreground);
+    if (xpc_connection_t connection = this->connection()->xpcConnection())
+        m_assertion = std::make_unique<ProcessAssertion>(xpc_connection_get_pid(connection), AssertionState::Foreground);
 #endif
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to