Index: chrome_frame/chrome_frame_automation.cc |
=================================================================== |
--- chrome_frame/chrome_frame_automation.cc (revision 70145) |
+++ chrome_frame/chrome_frame_automation.cc (working copy) |
@@ -73,13 +73,14 @@ |
// Get AddRef-ed pointer to corresponding TabProxy object |
TabProxy* tab = static_cast<TabProxy*>(tracker_->GetResource( |
message.routing_id())); |
+ bool handled = false; |
if (tab) { |
tab->OnMessageReceived(message); |
- tab->Release(); |
+ handled = tab->Release(); |
} else { |
DLOG(ERROR) << "Failed to find TabProxy for tab:" << message.routing_id(); |
} |
- return true; |
+ return handled; |
} |
virtual void OnChannelError() { |
@@ -1168,19 +1169,20 @@ |
// kind of beings. |
// By default we marshal the IPC message to the main/GUI thread and from there |
// we safely invoke chrome_frame_delegate_->OnMessageReceived(msg). |
-void ChromeFrameAutomationClient::OnMessageReceived(TabProxy* tab, |
+bool ChromeFrameAutomationClient::OnMessageReceived(TabProxy* tab, |
const IPC::Message& msg) { |
DCHECK(tab == tab_.get()); |
// Quickly process network related messages. |
if (url_fetcher_ && ProcessUrlRequestMessage(tab, msg, false)) |
- return; |
+ return true; |
// Early check to avoid needless marshaling |
if (chrome_frame_delegate_ == NULL) |
- return; |
+ return false; |
PostTask(FROM_HERE, NewRunnableMethod(this, |
&ChromeFrameAutomationClient::OnMessageReceivedUIThread, msg)); |
+ return true; |
} |
void ChromeFrameAutomationClient::OnChannelError(TabProxy* tab) { |