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

Unified Diff: chrome/browser/memory/tab_manager.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: chrome/browser/memory/tab_manager.cc
diff --git a/chrome/browser/memory/tab_manager.cc b/chrome/browser/memory/tab_manager.cc
index 55fde2097f6dd1372ba600689e0ddc302851f1f0..2a722639e6e1dbad4f316e4dd593fb82dc2f44e1 100644
--- a/chrome/browser/memory/tab_manager.cc
+++ b/chrome/browser/memory/tab_manager.cc
@@ -42,6 +42,7 @@
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_source.h"
#include "content/public/common/page_importance_signals.h"
#if defined(OS_CHROMEOS)
@@ -484,6 +485,7 @@ WebContents* TabManager::DiscardWebContentsAt(int index, TabStripModel* model) {
WebContents* null_contents =
WebContents::Create(WebContents::CreateParams(model->profile()));
+ WebContentsSource::CreateForWebContentsAndLocation(null_contents, FROM_HERE);
// Copy over the state from the navigation controller to preserve the
// back/forward history and to continue to display the correct title/favicon.
null_contents->GetController().CopyStateFrom(old_contents->GetController());

Powered by Google App Engine
This is Rietveld 408576698