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

Unified Diff: chrome/browser/cocoa/tab_strip_controller.mm

Issue 242139: Mac: Fix crash while dragging a tab alone in a window. (Closed)
Patch Set: Unconditionally clear tab controller's target. Created 11 years, 2 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 | chrome/browser/cocoa/tab_view.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/tab_strip_controller.mm
diff --git a/chrome/browser/cocoa/tab_strip_controller.mm b/chrome/browser/cocoa/tab_strip_controller.mm
index f431c93997b3f40c9f094052d1bb977aee30121d..4720d5f4efb855848a38fa64ee884967ff7bc43f 100644
--- a/chrome/browser/cocoa/tab_strip_controller.mm
+++ b/chrome/browser/cocoa/tab_strip_controller.mm
@@ -631,6 +631,12 @@ static const float kIndentLeavingSpaceForControls = 64.0;
NSView* tab = [self viewAtIndex:index];
[tab removeFromSuperview];
+ // Clear the tab controller's target.
+ // TODO(viettrungluu): [crbug.com/23829] Find a better way to handle the tab
+ // controller's target.
+ TabController* tabController = [tabArray_ objectAtIndex:index];
+ [tabController setTarget:nil];
+
if ([hoveredTab_ isEqual:tab]) {
hoveredTab_ = nil;
}
« no previous file with comments | « no previous file | chrome/browser/cocoa/tab_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698