diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-24 08:36:25 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-24 08:36:25 +0000 |
commit | 6db8d99051f1989b4912e4eaf4c20436a1244d41 (patch) | |
tree | 9772befa98e31e5fbbc163b731fa99a0ec1a38c1 /chrome_frame/chrome_frame_automation.cc | |
parent | 2c9847a108f297b51f1c9823d092d7959f80bf3f (diff) | |
download | chromium_src-6db8d99051f1989b4912e4eaf4c20436a1244d41.zip chromium_src-6db8d99051f1989b4912e4eaf4c20436a1244d41.tar.gz chromium_src-6db8d99051f1989b4912e4eaf4c20436a1244d41.tar.bz2 |
Revert 70144 and 70145 and add a build fix.
TBR=gfeher
Review URL: http://codereview.chromium.org/5959006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70146 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.cc')
-rw-r--r-- | chrome_frame/chrome_frame_automation.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc index a026669..d24188a 100644 --- a/chrome_frame/chrome_frame_automation.cc +++ b/chrome_frame/chrome_frame_automation.cc @@ -73,13 +73,14 @@ class ChromeFrameAutomationProxyImpl::TabProxyNotificationMessageFilter // 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 @@ bool ChromeFrameAutomationClient::ProcessUrlRequestMessage(TabProxy* tab, // 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) { |