Changeset 77938 in webkit


Ignore:
Timestamp:
Feb 8, 2011 8:01:13 AM (13 years ago)
Author:
Adam Roben
Message:

Don't mark a Connection as connected until open() is called on Windows

This matches Mac. Even though the Connection's pipe is connected before open() is called,
the Connection itself isn't really connected to the pipe until then, and we won't actually
read any data from before that point.

Fixes <http://webkit.org/b/53998> <rdar://problem/8971207> REGRESSION (r77874): Assertion
failure on launch in Connection::setDidCloseOnConnectionWorkQueueCallback on Windows

Reviewed by Darin Adler.

  • Platform/CoreIPC/win/ConnectionWin.cpp:

(CoreIPC::Connection::platformInitialize): Moved code to set m_isConnected from here to
open.
(CoreIPC::Connection::platformInvalidate): Unset m_isConnected, to match Mac. (This isn't
part of the bug fix, but seemed worthwhile.)
(CoreIPC::Connection::open): Set m_isConnected now that we're going to listen on the pipe.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r77915 r77938  
     12011-02-08  Adam Roben  <aroben@apple.com>
     2
     3        Don't mark a Connection as connected until open() is called on Windows
     4
     5        This matches Mac. Even though the Connection's pipe is connected before open() is called,
     6        the Connection itself isn't really connected to the pipe until then, and we won't actually
     7        read any data from before that point.
     8
     9        Fixes <http://webkit.org/b/53998> <rdar://problem/8971207> REGRESSION (r77874): Assertion
     10        failure on launch in Connection::setDidCloseOnConnectionWorkQueueCallback on Windows
     11
     12        Reviewed by Darin Adler.
     13
     14        * Platform/CoreIPC/win/ConnectionWin.cpp:
     15        (CoreIPC::Connection::platformInitialize): Moved code to set m_isConnected from here to
     16        open.
     17        (CoreIPC::Connection::platformInvalidate): Unset m_isConnected, to match Mac. (This isn't
     18        part of the bug fix, but seemed worthwhile.)
     19        (CoreIPC::Connection::open): Set m_isConnected now that we're going to listen on the pipe.
     20
    1212011-02-08  Sheriff Bot  <webkit.review.bot@gmail.com>
    222
  • trunk/Source/WebKit2/Platform/CoreIPC/win/ConnectionWin.cpp

    r76916 r77938  
    9090
    9191    m_connectionPipe = identifier;
    92 
    93     // We connected the two ends of the pipe in createServerAndClientIdentifiers.
    94     m_isConnected = true;
    9592}
    9693
     
    9996    if (m_connectionPipe == INVALID_HANDLE_VALUE)
    10097        return;
     98
     99    m_isConnected = false;
    101100
    102101    m_connectionQueue.unregisterAndCloseHandle(m_readState.hEvent);
     
    257256bool Connection::open()
    258257{
     258    // We connected the two ends of the pipe in createServerAndClientIdentifiers.
     259    m_isConnected = true;
     260
    259261    // Start listening for read and write state events.
    260262    m_connectionQueue.registerHandle(m_readState.hEvent, WorkItem::create(this, &Connection::readEventHandler));
Note: See TracChangeset for help on using the changeset viewer.