Use PostTask, not performSelector in NativeWidgetMac::Close()
In rare circumstances (more often with ASAN), a call to [window performSelector:@selector(close) withObject:nil afterDelay:0]; doesn't get run when ViewsTestBase::TearDown() does base::RunLoop run_loop; run_loop.RunUntilIdle(); ViewsTestBase then destroys other stuff. And, when the posted selector eventually gets executed, bad stuff happens. To fix, post a "regular" task, invoking -[NSWindow close]. Use a block to retain the window receiving the close. BUG=624648 Review-Url: https://codereview.chromium.org/2115453002 Cr-Commit-Position: refs/heads/master@{#403400}
Showing
Please register or sign in to comment