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

Unified Diff: components/constrained_window/constrained_window_views.cc

Issue 1432143002: Track where WebContents are created in order to better understand issue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: components/constrained_window/constrained_window_views.cc
diff --git a/components/constrained_window/constrained_window_views.cc b/components/constrained_window/constrained_window_views.cc
index 5ae6cd7776da6ae7eb24433ddda5d07c808fa9bd..d3c2a5dd0874c3024e999238cf21c92360895975 100644
--- a/components/constrained_window/constrained_window_views.cc
+++ b/components/constrained_window/constrained_window_views.cc
@@ -11,6 +11,7 @@
#include "components/web_modal/web_contents_modal_dialog_host.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
+#include "content/public/browser/web_contents_source.h"
#include "ui/views/border.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_observer.h"
@@ -146,6 +147,16 @@ views::Widget* ShowWebModalDialogViews(
views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog,
content::WebContents* web_contents) {
+ // Code to help trace the source of http://crbug.com/538612
+ WebContentsSource* web_contents_creation_site =
+ WebContentsSource::FromWebContents(web_contents);
+ tracked_objects::Location created_location;
+ if (web_contents_creation_site)
+ created_location = web_contents_creation_site->created_location();
+ base::debug::Alias(&created_location);
Mike Wittman 2015/11/11 17:15:28 needs an #include
hcarmona 2015/11/11 19:57:58 Done.
+ CHECK(
+ web_modal::WebContentsModalDialogManager::FromWebContents(web_contents));
+
DCHECK_EQ(ui::MODAL_TYPE_CHILD, dialog->GetModalType());
return views::DialogDelegate::CreateDialogWidget(
dialog, nullptr,

Powered by Google App Engine
This is Rietveld 408576698