[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
aroben at apple.com
aroben at apple.com
Wed Dec 22 12:35:36 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 20587c84cc6bbcd9a5360c4bbc1aaae09e1eb50f
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Aug 25 20:06:53 2010 +0000
Clean up Connection::open on Windows
Fixes <http://webkit.org/b/44185>.
Reviewed by Steve Falkenburg.
* Platform/CoreIPC/win/ConnectionWin.cpp:
(CoreIPC::Connection::platformInitialize): Set m_isConnected to true
since the pipe got connected before it was even given to us.
(CoreIPC::Connection::readEventHandler): Removed code that will never
run now that m_isConnected is always true when this function is
called. Since no outgoing messages will have been queued before
m_isConnected is set to true, there's no need to send them explicitly
here; they'll get sent as they're queued.
(CoreIPC::Connection::open): Removed the call to ::ConnectNamedPipe,
since the pipe is already connected by this point. Changed to schedule
a read in the server and client the same way (rather than using
::SetEvent in the server).
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 122a3a1..c4e315a 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,24 @@
+2010-08-25 Adam Roben <aroben at apple.com>
+
+ Clean up Connection::open on Windows
+
+ Fixes <http://webkit.org/b/44185>.
+
+ Reviewed by Steve Falkenburg.
+
+ * Platform/CoreIPC/win/ConnectionWin.cpp:
+ (CoreIPC::Connection::platformInitialize): Set m_isConnected to true
+ since the pipe got connected before it was even given to us.
+ (CoreIPC::Connection::readEventHandler): Removed code that will never
+ run now that m_isConnected is always true when this function is
+ called. Since no outgoing messages will have been queued before
+ m_isConnected is set to true, there's no need to send them explicitly
+ here; they'll get sent as they're queued.
+ (CoreIPC::Connection::open): Removed the call to ::ConnectNamedPipe,
+ since the pipe is already connected by this point. Changed to schedule
+ a read in the server and client the same way (rather than using
+ ::SetEvent in the server).
+
2010-08-19 Adam Roben <aroben at apple.com>
Call NP_GetEntryPoints before NP_Initialize on Windows
diff --git a/WebKit2/Platform/CoreIPC/win/ConnectionWin.cpp b/WebKit2/Platform/CoreIPC/win/ConnectionWin.cpp
index f303c8a..136d0f3 100644
--- a/WebKit2/Platform/CoreIPC/win/ConnectionWin.cpp
+++ b/WebKit2/Platform/CoreIPC/win/ConnectionWin.cpp
@@ -88,6 +88,9 @@ void Connection::platformInitialize(Identifier identifier)
m_writeState.hEvent = ::CreateEventW(0, FALSE, FALSE, 0);
m_connectionPipe = identifier;
+
+ // We connected the two ends of the pipe in createServerAndClientIdentifiers.
+ m_isConnected = true;
}
void Connection::platformInvalidate()
@@ -109,14 +112,6 @@ void Connection::platformInvalidate()
void Connection::readEventHandler()
{
- bool wasConnected = m_isConnected;
- if (!m_isConnected) {
- m_isConnected = true;
-
- // We're now connected, send any outgoing messages we might have.
- sendOutgoingMessages();
- }
-
while (true) {
// Check if we got some data.
DWORD numberOfBytesRead = 0;
@@ -255,31 +250,8 @@ bool Connection::open()
m_connectionQueue.registerHandle(m_readState.hEvent, WorkItem::create(this, &Connection::readEventHandler));
m_connectionQueue.registerHandle(m_writeState.hEvent, WorkItem::create(this, &Connection::writeEventHandler));
- if (m_isServer) {
- // Wait for a connection.
- if (::ConnectNamedPipe(m_connectionPipe, &m_readState))
- m_isConnected = true;
- else {
- // Even though the call to ConnectNamedPipe failed, we might still have a valid connection.
- DWORD error = ::GetLastError();
- if (error == ERROR_PIPE_CONNECTED) {
- // The client connected to the named pipe before we opened the connection.
- m_isConnected = true;
- } else if (error != ERROR_IO_PENDING) {
- // Something went wrong.
- // FIXME: Close the pipe here.
- return false;
- }
- }
-
- if (m_isConnected) {
- // Signal the read event handle.
- ::SetEvent(m_readState.hEvent);
- }
- } else {
- // Schedule a read.
- m_connectionQueue.scheduleWork(WorkItem::create(this, &Connection::readEventHandler));
- }
+ // Schedule a read.
+ m_connectionQueue.scheduleWork(WorkItem::create(this, &Connection::readEventHandler));
return true;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list