diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-26 04:43:05 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-26 04:43:05 +0000 |
commit | 093e38a026dbfdc1dadb864e7ab4b82c02410ef6 (patch) | |
tree | a6077f9158c49c60fc9e3479704f01992042f483 /chrome_frame | |
parent | e5609f495ab306821bec9cc43221324277787655 (diff) | |
download | chromium_src-093e38a026dbfdc1dadb864e7ab4b82c02410ef6.zip chromium_src-093e38a026dbfdc1dadb864e7ab4b82c02410ef6.tar.gz chromium_src-093e38a026dbfdc1dadb864e7ab4b82c02410ef6.tar.bz2 |
In ChromeFrame there are cases when the ChromeFrameAutomationProxy::SendAsAsync function can be passed a NULL callback. The dispatcher needs
to check for the same and ignore the returned callback message. We currently crash on trunk.
Review URL: http://codereview.chromium.org/2227001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48256 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/sync_msg_reply_dispatcher.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome_frame/sync_msg_reply_dispatcher.cc b/chrome_frame/sync_msg_reply_dispatcher.cc index 1b51516..a59ba68 100644 --- a/chrome_frame/sync_msg_reply_dispatcher.cc +++ b/chrome_frame/sync_msg_reply_dispatcher.cc @@ -9,12 +9,14 @@ void SyncMessageReplyDispatcher::Push(IPC::SyncMessage* msg, SyncMessageCallContext* context, void* key) { - context->message_type_ = msg->type(); - context->id_ = IPC::SyncMessage::GetMessageId(*msg); - context->key_ = key; + if (context) { + context->message_type_ = msg->type(); + context->id_ = IPC::SyncMessage::GetMessageId(*msg); + context->key_ = key; - AutoLock lock(message_queue_lock_); - message_queue_.push_back(context); + AutoLock lock(message_queue_lock_); + message_queue_.push_back(context); + } } bool SyncMessageReplyDispatcher::HandleMessageType( |