Index: chrome/browser/android/web_contents_factory.cc |
diff --git a/chrome/browser/android/web_contents_factory.cc b/chrome/browser/android/web_contents_factory.cc |
index 5df6ca82a788a7fe9f335a3c80a6c4828f2fbf2a..3f3e086d3d63c51d6a2e18201a8afd46dd07e4f5 100644 |
--- a/chrome/browser/android/web_contents_factory.cc |
+++ b/chrome/browser/android/web_contents_factory.cc |
@@ -12,18 +12,15 @@ |
#include "content/public/browser/web_contents.h" |
#include "jni/WebContentsFactory_jni.h" |
-static ScopedJavaLocalRef<jobject> CreateWebContents( |
- JNIEnv* env, |
- jclass clazz, |
- jboolean incognito, |
- jboolean initially_hidden) { |
+static jobject CreateWebContents( |
+ JNIEnv* env, jclass clazz, jboolean incognito, jboolean initially_hidden) { |
Profile* profile = g_browser_process->profile_manager()->GetLastUsedProfile(); |
if (incognito) |
profile = profile->GetOffTheRecordProfile(); |
content::WebContents::CreateParams params(profile); |
params.initially_hidden = static_cast<bool>(initially_hidden); |
- return content::WebContents::Create(params)->GetJavaWebContents(); |
+ return content::WebContents::Create(params)->GetJavaWebContents().Release(); |
} |
bool RegisterWebContentsFactory(JNIEnv* env) { |