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

Unified Diff: content/browser/web_contents/web_contents_view_mac.mm

Issue 910013003: Mac: Fix crash due to occluding view during tear-down (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_view_mac.mm
diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm
index 27989c3951ffce334f0a2f48c2db99b67f3695df..91a4f5d2667450a7b4d3f10e12196999f0a69316 100644
--- a/content/browser/web_contents/web_contents_view_mac.mm
+++ b/content/browser/web_contents/web_contents_view_mac.mm
@@ -627,7 +627,7 @@ void WebContentsViewMac::CloseTab() {
DCHECK(base::mac::IsOSMavericksOrLater());
NSWindow* window = [notification object];
WebContentsImpl* webContents = [self webContents];
- if (window && webContents) {
+ if (window && webContents && !webContents->IsBeingDestroyed()) {
if ([window occlusionState] & NSWindowOcclusionStateVisible) {
webContents->WasUnOccluded();
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698