|
Lines 344-353
std::unique_ptr<MessageEncoder> Connecti
Source/WebKit2/Platform/IPC/Connection.cpp_sec1
|
| 344 |
return encoder; |
344 |
return encoder; |
| 345 |
} |
345 |
} |
| 346 |
|
346 |
|
|
|
347 |
#include <syslog.h> |
| 348 |
|
| 347 |
bool Connection::sendMessage(std::unique_ptr<MessageEncoder> encoder, unsigned messageSendFlags, bool alreadyRecordedMessage) |
349 |
bool Connection::sendMessage(std::unique_ptr<MessageEncoder> encoder, unsigned messageSendFlags, bool alreadyRecordedMessage) |
| 348 |
{ |
350 |
{ |
| 349 |
if (!isValid()) |
351 |
if (!isValid()) { |
|
|
352 |
syslog(LOG_MAKEPRI(LOG_SYSLOG, LOG_CRIT), "<<<<< Connection::sendMessage >>>: %s. INVALID connection. Bailing out.", encoder ? encoder->messageName().data() : "(null)"); |
| 350 |
return false; |
353 |
return false; |
|
|
354 |
} |
| 351 |
|
355 |
|
| 352 |
if (messageSendFlags & DispatchMessageEvenWhenWaitingForSyncReply |
356 |
if (messageSendFlags & DispatchMessageEvenWhenWaitingForSyncReply |
| 353 |
&& (!m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage |
357 |
&& (!m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage |
|
Lines 703-710
void Connection::postConnectionDidCloseO
Source/WebKit2/Platform/IPC/Connection.cpp_sec2
|
| 703 |
}); |
707 |
}); |
| 704 |
} |
708 |
} |
| 705 |
|
709 |
|
|
|
710 |
#include <syslog.h> |
| 711 |
|
| 706 |
void Connection::connectionDidClose() |
712 |
void Connection::connectionDidClose() |
| 707 |
{ |
713 |
{ |
|
|
714 |
syslog(LOG_MAKEPRI(LOG_SYSLOG, LOG_CRIT), "<<<<< Connection::connectionDidClose >>>"); |
| 715 |
|
| 708 |
// The connection is now invalid. |
716 |
// The connection is now invalid. |
| 709 |
platformInvalidate(); |
717 |
platformInvalidate(); |
| 710 |
|
718 |
|
|
Lines 733-738
void Connection::connectionDidClose()
Source/WebKit2/Platform/IPC/Connection.cpp_sec3
|
| 733 |
|
741 |
|
| 734 |
RefPtr<Connection> connection(this); |
742 |
RefPtr<Connection> connection(this); |
| 735 |
RunLoop::main().dispatch([connection] { |
743 |
RunLoop::main().dispatch([connection] { |
|
|
744 |
|
| 745 |
syslog(LOG_MAKEPRI(LOG_SYSLOG, LOG_CRIT), "<<<<< Connection::connectionDidClose >>>: Runloop dispatch for didClose handling. Connection client is (%p)", connection->m_client); |
| 746 |
|
| 736 |
// If the connection has been explicitly invalidated before dispatchConnectionDidClose was called, |
747 |
// If the connection has been explicitly invalidated before dispatchConnectionDidClose was called, |
| 737 |
// then the client will be null here. |
748 |
// then the client will be null here. |
| 738 |
if (!connection->m_client) |
749 |
if (!connection->m_client) |
|
Lines 744-749
void Connection::connectionDidClose()
Source/WebKit2/Platform/IPC/Connection.cpp_sec4
|
| 744 |
Client* client = connection->m_client; |
755 |
Client* client = connection->m_client; |
| 745 |
connection->m_client = nullptr; |
756 |
connection->m_client = nullptr; |
| 746 |
|
757 |
|
|
|
758 |
syslog(LOG_MAKEPRI(LOG_SYSLOG, LOG_CRIT), "<<<<< Connection::connectionDidClose >>>: Runloop dispatch calling didClose on client (%p)", connection->m_client); |
| 759 |
|
| 747 |
client->didClose(*connection); |
760 |
client->didClose(*connection); |
| 748 |
}); |
761 |
}); |
| 749 |
} |
762 |
} |
|
Lines 755-762
bool Connection::canSendOutgoingMessages
Source/WebKit2/Platform/IPC/Connection.cpp_sec5
|
| 755 |
|
768 |
|
| 756 |
void Connection::sendOutgoingMessages() |
769 |
void Connection::sendOutgoingMessages() |
| 757 |
{ |
770 |
{ |
| 758 |
if (!canSendOutgoingMessages()) |
771 |
if (!canSendOutgoingMessages()) { |
|
|
772 |
syslog(LOG_MAKEPRI(LOG_SYSLOG, LOG_CRIT), "<<<<< Connection::sendOutgoingMessages >>> Can't send. Returning."); |
| 759 |
return; |
773 |
return; |
|
|
774 |
} |
| 760 |
|
775 |
|
| 761 |
while (true) { |
776 |
while (true) { |
| 762 |
std::unique_ptr<MessageEncoder> message; |
777 |
std::unique_ptr<MessageEncoder> message; |