Changeset 167638 in webkit


Ignore:
Timestamp:
Apr 21, 2014 5:23:04 PM (10 years ago)
Author:
Simon Fraser
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):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r167635 r167638  
     12014-04-21  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Don't try to use a null connection()->xpcConnection()
     4        https://bugs.webkit.org/show_bug.cgi?id=131961
     5
     6        Reviewed by Dan Bernstein.
     7       
     8        If running with -WebKit2UseXPCServiceForWebProcess NO, connection()->xpcConnection()
     9        is null and xpc_connection_get_pid() would crash, so null-check the xpcConnection.
     10
     11        * UIProcess/Network/NetworkProcessProxy.cpp:
     12        (WebKit::NetworkProcessProxy::didFinishLaunching):
     13
    1142014-04-21  Dan Bernstein  <mitz@apple.com>
    215
  • trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp

    r167410 r167638  
    202202   
    203203#if PLATFORM(IOS) && USE(XPC_SERVICES)
    204     m_assertion = std::make_unique<ProcessAssertion>(xpc_connection_get_pid(connection()->xpcConnection()), AssertionState::Foreground);
     204    if (xpc_connection_t connection = this->connection()->xpcConnection())
     205        m_assertion = std::make_unique<ProcessAssertion>(xpc_connection_get_pid(connection), AssertionState::Foreground);
    205206#endif
    206207}
Note: See TracChangeset for help on using the changeset viewer.