summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-08 22:43:59 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-08 22:43:59 +0000
commit996042979c44065545585e8573f60d7af3e5224e (patch)
tree66bec394384405dd69679c59fb23c85d35fdb1eb /content/browser
parent958a49a8533efb26965f58de90392eef26cc9e72 (diff)
downloadchromium_src-996042979c44065545585e8573f60d7af3e5224e.zip
chromium_src-996042979c44065545585e8573f60d7af3e5224e.tar.gz
chromium_src-996042979c44065545585e8573f60d7af3e5224e.tar.bz2
Make sure that TabContents' observer list outlives the RenderViewHostManager. The latter's destruction can call into RenderViewHost's destructor, which can call back to TabContents which in turn can use the observers.
BUG=101954 Review URL: http://codereview.chromium.org/8497022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109116 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/tab_contents/tab_contents.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h
index 37dc8c3..8a99fda 100644
--- a/content/browser/tab_contents/tab_contents.h
+++ b/content/browser/tab_contents/tab_contents.h
@@ -735,6 +735,12 @@ class CONTENT_EXPORT TabContents : public PageNavigator,
// The corresponding view.
scoped_ptr<TabContentsView> view_;
+ // A list of observers notified when page state changes. Weak references.
+ // This MUST be listed above render_manager_ since at destruction time the
+ // latter might cause RenderViewHost's destructor to call us and we might use
+ // the observer list then.
+ ObserverList<TabContentsObserver> observers_;
+
// Helper classes ------------------------------------------------------------
// Manages creation and swapping of render views.
@@ -849,9 +855,6 @@ class CONTENT_EXPORT TabContents : public PageNavigator,
// remember it.
bool temporary_zoom_settings_;
- // A list of observers notified when page state changes. Weak references.
- ObserverList<TabContentsObserver> observers_;
-
// Content restrictions, used to disable print/copy etc based on content's
// (full-page plugins for now only) permissions.
int content_restrictions_;