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

Unified Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 69813005: Fix crash in WebContentsViewAura::WindowObserver that happens when switching tabs. The exact repro … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix Created 7 years, 1 month 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 | « chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc ('k') | 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_aura.cc
===================================================================
--- content/browser/web_contents/web_contents_view_aura.cc (revision 235277)
+++ content/browser/web_contents/web_contents_view_aura.cc (working copy)
@@ -799,6 +799,13 @@
window->GetDispatcher()->RemoveRootWindowObserver(this);
#if defined(OS_WIN)
window->GetRootWindow()->RemoveObserver(this);
+
+ const aura::Window::Windows& root_children =
+ window->GetRootWindow()->children();
+ for (size_t i = 0; i < root_children.size(); ++i) {
+ if (root_children[i] != view_->window_ && root_children[i] != parent_)
+ root_children[i]->RemoveObserver(this);
+ }
#endif
}
}
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698