Bug 1036682 - Check that the ipdl connection is not lost before sending messages. r=bjacob

This commit is contained in:
Nicolas Silva 2014-11-14 11:25:16 +01:00
Родитель b51bee2187
Коммит 8ff90737a5
3 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -18,6 +18,11 @@
namespace mozilla {
namespace layers {
bool
LayerTransactionChild::IPCOpen()
{
return mIPCOpen && !mDestroyed && GetIPCChannel()->Connected();
}
void
LayerTransactionChild::Destroy()

Просмотреть файл

@ -40,7 +40,7 @@ public:
*/
void Destroy();
bool IPCOpen() const { return mIPCOpen && !mDestroyed; }
bool IPCOpen();
void SetForwarder(ShadowLayerForwarder* aForwarder)
{

Просмотреть файл

@ -80,6 +80,8 @@ class MessageChannel : HasResultCodes
// Close the underlying transport channel.
void Close();
bool Connected() const;
// Force the channel to behave as if a channel error occurred. Valid
// for process links only, not thread links.
void CloseWithError();
@ -343,8 +345,6 @@ class MessageChannel : HasResultCodes
return mDispatchingSyncMessagePriority;
}
bool Connected() const;
private:
// Executed on the IO thread.
void NotifyWorkerThread();