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

Unified Diff: chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.mm

Issue 11026050: Fix crash when using Instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
Index: chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.mm
diff --git a/chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.mm b/chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.mm
index dc62be6ab5f417f07048f103293645d968940520..cc0a4b9e617b17654865e2e2653252d55b46f251 100644
--- a/chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.mm
@@ -49,6 +49,13 @@ using content::WebContents;
previewContents_ = nil;
}
+- (void)onInsertTabWithContents:(WebContents*)contents {
+ if (previewContents_ == contents) {
+ [previewContents_->GetNativeView() removeFromSuperview];
+ previewContents_ = nil;
+ }
+}
+
- (BOOL)isShowingPreview {
return previewContents_ != nil;
}

Powered by Google App Engine
This is Rietveld 408576698