Track where WebContents are created in order to better understand issue.
This is a temporary change to track down a beta blocking crash.
This CL doesn't fix the crash, but will give us more information.
The crash is happening when we attempt to show a modal dialog on some
unknown WebContents that doesn't have a WebModalDialogManager. Not all
WebContents are expecting to show modal dialogs and the creator of the
WebModalDialog doesn't control what WebContents they will get at
runtime. So, because of this loose coupling, we don't know which
WebContents is triggering the crash.
By adding this trace we expect to learn where the WebContents are
created in order to make sure they have a WebModalDialogManager.
BUG=538612
Review URL: https://codereview.chromium.org/1488883002
Cr-Commit-Position: refs/heads/master@{#363595}
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 213cc58..69656888 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -373,6 +373,7 @@
void HasManifest(const HasManifestCallback& callback) override;
void ExitFullscreen() override;
void ResumeLoadingCreatedWebContents() override;
+ base::debug::StackTrace GetCreationStackTrace() override;
#if defined(OS_ANDROID)
void OnMediaSessionStateChanged();
void ResumeMediaSession() override;
@@ -1333,6 +1334,9 @@
bool page_scale_factor_is_one_;
+ // Temporary to track down http://crbug.com/538612
+ base::debug::StackTrace stack_trace_;
+
base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_;
DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);