summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-11 06:07:03 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-11 06:07:03 +0000
commitc8fe571e9a5a2d63884ab0da86df190ce5b2ef6a (patch)
treef2c04bbfbfb711e9d69d30b6d59636a00ce8dba0
parentc7f689be146dd9f7ff0c271f4fc736ea6adeaaa6 (diff)
downloadchromium_src-c8fe571e9a5a2d63884ab0da86df190ce5b2ef6a.zip
chromium_src-c8fe571e9a5a2d63884ab0da86df190ce5b2ef6a.tar.gz
chromium_src-c8fe571e9a5a2d63884ab0da86df190ce5b2ef6a.tar.bz2
Speculative fix for a common crash. We were leaking the
BrowserActionView because RemoveChild() does not delete it. This could maybe cause OnImageLoaded() to be called when there is no parent. I couldn't see any other path that could lead to that. BUG=27167 TEST=none Review URL: http://codereview.chromium.org/385031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31651 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/views/browser_actions_container.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/browser/views/browser_actions_container.cc b/chrome/browser/views/browser_actions_container.cc
index dbae46b..561df9b 100644
--- a/chrome/browser/views/browser_actions_container.cc
+++ b/chrome/browser/views/browser_actions_container.cc
@@ -300,6 +300,7 @@ void BrowserActionsContainer::RemoveBrowserAction(Extension* extension) {
++iter) {
if ((*iter)->button()->extension() == extension) {
RemoveChildView(*iter);
+ delete *iter;
browser_action_views_.erase(iter);
if (GetParent())
GetParent()->SchedulePaint();