$OpenBSD$ index 784e4cb..cc44641 100644 --- ipc/glue/MessageChannel.h.orig Fri Feb 20 15:40:37 2015 +++ ipc/glue/MessageChannel.h Fri Feb 20 15:40:37 2015 @@ -60,13 +60,13 @@ class MessageChannel : HasResultCodes // "Open" from the perspective of the transport layer; the underlying // socketpair/pipe should already be created. // - // Returns true iff the transport layer was successfully connected, + // Returns true if the transport layer was successfully connected, // i.e., mChannelState == ChannelConnected. bool Open(Transport* aTransport, MessageLoop* aIOLoop=0, Side aSide=UnknownSide); // "Open" a connection to another thread in the same process. // - // Returns true iff the transport layer was successfully connected, + // Returns true if the transport layer was successfully connected, // i.e., mChannelState == ChannelConnected. // // For more details on the process of opening a channel between @@ -86,6 +86,19 @@ class MessageChannel : HasResultCodes mAbortOnError = true; } + // Misc. behavioral traits consumers can request for this channel + enum ChannelFlags { + REQUIRE_DEFAULT = 0, + // Windows: if this channel operates on the UI thread, indicates + // WindowsMessageLoop code should enable deferred native message + // handling to prevent deadlocks. Should only be used for protocols + // that manage child processes which might create native UI, like + // plugins. + REQUIRE_DEFERRED_MESSAGE_PROTECTION = 1 << 0 + }; + void SetChannelFlags(ChannelFlags aFlags) { mFlags = aFlags; } + ChannelFlags GetChannelFlags() { return mFlags; } + // Asynchronously send a message to the other side of the channel bool Send(Message* aMsg); @@ -160,6 +173,8 @@ class MessageChannel : HasResultCodes // The deepest sync stack frame for this channel. SyncStackFrame* mTopFrame; + bool mIsSyncWaitingOnNonMainThread; + // The deepest sync stack frame on any channel. static SyncStackFrame* sStaticTopFrame; @@ -632,6 +647,9 @@ class MessageChannel : HasResultCodes // Should the channel abort the process from the I/O thread when // a channel error occurs? bool mAbortOnError; + + // See SetChannelFlags + ChannelFlags mFlags; }; } // namespace ipc