Index: views/controls/combobox/combobox.cc |
diff --git a/views/controls/combobox/combobox.cc b/views/controls/combobox/combobox.cc |
index 0f8ee2bdee16e2e35578500faaaaa54071d3b460..794301aa32cf5dfbccfbdd5388f3c91652c2a192 100644 |
--- a/views/controls/combobox/combobox.cc |
+++ b/views/controls/combobox/combobox.cc |
@@ -129,6 +129,8 @@ void Combobox::GetAccessibleState(ui::AccessibleViewState* state) { |
void Combobox::ViewHierarchyChanged(bool is_add, View* parent, |
View* child) { |
if (is_add && !native_wrapper_ && GetWidget()) { |
+ // The native wrapper's lifetime will be managed by the view hierarchy after |
+ // we call AddChildView. |
native_wrapper_ = NativeComboboxWrapper::CreateWrapper(this); |
tfarina
2011/09/20 18:10:50
Same as in views/controls/textfield/textfield.cc:4
|
AddChildView(native_wrapper_->GetView()); |
} |