summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-07 16:36:08 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-07 16:36:08 +0000
commit7a2f8f90696c8301bcf3bbb5047f614d8c9c4b70 (patch)
tree7cad5342ad47fc08b6826690b7e73ca6b8049e4f /content/browser
parent36254f7371c1f78a19442b4ae6fcab5f7cbcb330 (diff)
downloadchromium_src-7a2f8f90696c8301bcf3bbb5047f614d8c9c4b70.zip
chromium_src-7a2f8f90696c8301bcf3bbb5047f614d8c9c4b70.tar.gz
chromium_src-7a2f8f90696c8301bcf3bbb5047f614d8c9c4b70.tar.bz2
Fix AutoFill regression which caused stale routing_ids to be used when the RenderView for a TabContents changed (i.e. in this case, when navigation causes new renderer process for a tab). TabContentsWrapper should always use the current RV to get the routing_id, and not cache it.
BUG=78509 Review URL: http://codereview.chromium.org/6813011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80793 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/tab_contents/tab_contents_observer.cc7
-rw-r--r--content/browser/tab_contents/tab_contents_observer.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/content/browser/tab_contents/tab_contents_observer.cc b/content/browser/tab_contents/tab_contents_observer.cc
index a391402..3dff039 100644
--- a/content/browser/tab_contents/tab_contents_observer.cc
+++ b/content/browser/tab_contents/tab_contents_observer.cc
@@ -85,6 +85,13 @@ bool TabContentsObserver::Send(IPC::Message* message) {
return tab_contents_->render_view_host()->Send(message);
}
+int TabContentsObserver::routing_id() const {
+ if (!tab_contents_ || !tab_contents_->render_view_host())
+ return MSG_ROUTING_NONE;
+
+ return tab_contents_->render_view_host()->routing_id();
+}
+
void TabContentsObserver::SetTabContents(TabContents* tab_contents) {
tab_contents_ = tab_contents;
if (tab_contents_)
diff --git a/content/browser/tab_contents/tab_contents_observer.h b/content/browser/tab_contents/tab_contents_observer.h
index ad65247..3d7e887 100644
--- a/content/browser/tab_contents/tab_contents_observer.h
+++ b/content/browser/tab_contents/tab_contents_observer.h
@@ -91,7 +91,7 @@ class TabContentsObserver : public IPC::Channel::Listener,
virtual bool Send(IPC::Message* message);
TabContents* tab_contents() const { return tab_contents_; }
- int routing_id() const { return routing_id_; }
+ int routing_id() const;
protected:
friend class Registrar;