Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Unified Diff: chrome/browser/autocomplete/autocomplete_popup_view_mac.mm

Issue 100260: Release the autocomplete popup panel when not visible. (Closed)
Patch Set: Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
index 4a6a85fdf67d9a72917423be3575193550051e2a..3d9a6d448711adab9593b0520961000133887a6c 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
@@ -111,6 +111,14 @@ void AutocompletePopupViewMac::UpdatePopupAppearance() {
if (result.empty()) {
[[popup_ parentWindow] removeChildWindow:popup_];
[popup_ orderOut:nil];
+
+ // Break references to table_target_ releasing popup_.
+ NSTableView* table = [popup_ contentView];
+ [table setTarget:nil];
+ [table setDataSource:nil];
+
+ popup_.reset(nil);
+
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698