summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-08 22:02:22 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-08 22:02:22 +0000
commit79e5f675dfe28f0581829236491f801396856abc (patch)
tree89df66232b5bf1d0dd56b2b9c22b2eb7e1cf8def
parent9ded804e000448ebe0f51ffa7adb86ab863cdbfe (diff)
downloadchromium_src-79e5f675dfe28f0581829236491f801396856abc.zip
chromium_src-79e5f675dfe28f0581829236491f801396856abc.tar.gz
chromium_src-79e5f675dfe28f0581829236491f801396856abc.tar.bz2
[Mac] Fix use-after-free when dragging tabs with page-actions.
This patches in the relevant bit of r38299: http://src.chromium.org/viewvc/chrome?view=rev&revision=38299 > When dragging and dropping a tab who's window is going away entirely, > the LocationBarViewMac instance and the PageActionViewList w/in go > away before the cell. Sometimes windows can re-display while being > closed, then BANG. BUG=34110 TEST=Install an extension which shows a page action (*). Bring up two tabs, drag one with the page action off to a separate window. Drag it back into the first window. (*) For instance, the "Subscribe in Feed Reader" example at http://code.google.com/chrome/extensions/samples.html , then browse to Google News to get a page action. Review URL: http://codereview.chromium.org/586009 git-svn-id: svn://svn.chromium.org/chrome/branches/307/src@38400 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/cocoa/location_bar_view_mac.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/location_bar_view_mac.mm b/chrome/browser/cocoa/location_bar_view_mac.mm
index 78b0fec..718f717 100644
--- a/chrome/browser/cocoa/location_bar_view_mac.mm
+++ b/chrome/browser/cocoa/location_bar_view_mac.mm
@@ -106,6 +106,11 @@ LocationBarViewMac::LocationBarViewMac(
}
LocationBarViewMac::~LocationBarViewMac() {
+ // Disconnect from cell in case it outlives us.
+ AutocompleteTextFieldCell* cell = [field_ autocompleteTextFieldCell];
+ [cell setPageActionViewList:NULL];
+ [cell setSecurityImageView:NULL];
+
// TODO(shess): Placeholder for omnibox changes.
delete page_action_views_;
}