bug 517923: support serializing ns*Strings that represent NULL, use this mechanism in PluginInstanceParent/PluginModuleChild. also add basic crash-handling to *Channel code and some NS_OVERRIDE annotations.

This commit is contained in:
Chris Jones
2009-09-21 21:02:15 -05:00
parent 62678e49c2
commit bad3ef29a6
10 changed files with 170 additions and 38 deletions

View File

@@ -112,9 +112,11 @@ AsyncChannel::Close()
bool
AsyncChannel::Send(Message* msg)
{
NS_ASSERTION(ChannelConnected == mChannelState,
"trying to Send() to a channel not yet open");
NS_PRECONDITION(MSG_ROUTING_NONE != msg->routing_id(), "need a route");
NS_ABORT_IF_FALSE(MSG_ROUTING_NONE != msg->routing_id(), "need a route");
if (!Connected())
// trying to Send() to a closed or error'd channel
return false;
mIOLoop->PostTask(FROM_HERE,
NewRunnableMethod(this, &AsyncChannel::OnSend, msg));