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

Unified Diff: chrome/browser/dom_distiller/tab_utils.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/dom_distiller/tab_utils.cc
diff --git a/chrome/browser/dom_distiller/tab_utils.cc b/chrome/browser/dom_distiller/tab_utils.cc
index fda3c8d764bf4e5f65fb3c1ddb0921fc8097adfa..6a9bd4676b7c709870df619bedd8da2b18c7a083 100644
--- a/chrome/browser/dom_distiller/tab_utils.cc
+++ b/chrome/browser/dom_distiller/tab_utils.cc
@@ -18,6 +18,7 @@
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
+#include "content/public/browser/web_contents_source.h"
namespace {
@@ -143,6 +144,8 @@ void DistillCurrentPageAndView(content::WebContents* old_web_contents) {
content::WebContents* new_web_contents =
content::WebContents::Create(create_params);
DCHECK(new_web_contents);
+ WebContentsSource::CreateForWebContentsAndLocation(new_web_contents,
+ FROM_HERE);
// Copy all navigation state from the old WebContents to the new one.
new_web_contents->GetController().CopyStateFrom(

Powered by Google App Engine
This is Rietveld 408576698