Commit afdec7b1 authored by rsesek@chromium.org's avatar rsesek@chromium.org

[Mac] Stop listening for NSWindowWillCloseNotification in |-dealloc| to fix a crash.

BUG=101484
TEST=Open the avatar bubble and hit Cmd+Q. No crash.


Review URL: http://codereview.chromium.org/8351038

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108138 0039d316-1c4b-4281-b951-d872f2087c98
parent f75423f1
......@@ -132,6 +132,14 @@ const CGFloat kMenuYOffsetAdjust = 1.0;
return self;
}
- (void)dealloc {
[[NSNotificationCenter defaultCenter]
removeObserver:self
name:NSWindowWillCloseNotification
object:[menuController_ window]];
[super dealloc];
}
- (NSButton*)buttonView {
return static_cast<NSButton*>(self.view);
}
......
......@@ -22,7 +22,7 @@ class HungRendererControllerTest : public CocoaTest {
HungRendererController* hung_renderer_controller_; // owned by its window
};
TEST_F(HungRendererControllerTest, FLAKY_TestShowAndClose) {
TEST_F(HungRendererControllerTest, TestShowAndClose) {
// Doesn't test much functionality-wise, but makes sure we can
// display and tear down a window.
[hung_renderer_controller_ showWindow:nil];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment