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

Unified Diff: android_webview/native/aw_contents.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: android_webview/native/aw_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index 4a829faba54b118a22fb0e754abd9afe931e9574..3eab578064812c7639b30353df84553c0b96b7e6 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -63,6 +63,7 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_source.h"
#include "content/public/common/message_port_types.h"
#include "content/public/common/renderer_preferences.h"
#include "content/public/common/ssl_status.h"
@@ -320,6 +321,8 @@ static jlong Init(JNIEnv* env,
// than hard-code the default instance lookup here.
scoped_ptr<WebContents> web_contents(content::WebContents::Create(
content::WebContents::CreateParams(AwBrowserContext::GetDefault())));
+ WebContentsSource::CreateForWebContentsAndLocation(web_contents.get(),
+ FROM_HERE);
// Return an 'uninitialized' instance; most work is deferred until the
// subsequent SetJavaPeers() call.
return reinterpret_cast<intptr_t>(new AwContents(web_contents.Pass()));

Powered by Google App Engine
This is Rietveld 408576698