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

Unified Diff: android_webview/lib/main/webview_entry_point.cc

Issue 136723010: Android WebView: initialize url_util safely. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/lib/main/webview_entry_point.cc
diff --git a/android_webview/lib/main/webview_entry_point.cc b/android_webview/lib/main/webview_entry_point.cc
index 858601f3ba0335fe7f32870ddb5df7b947a6b63a..7038416fc9b12b2c4b0cffff7ace9c5c7c261aed 100644
--- a/android_webview/lib/main/webview_entry_point.cc
+++ b/android_webview/lib/main/webview_entry_point.cc
@@ -10,6 +10,7 @@
#include "components/web_contents_delegate_android/component_jni_registrar.h"
#include "content/public/app/android_library_loader_hooks.h"
#include "content/public/app/content_main.h"
+#include "url/url_util.h"
static base::android::RegistrationMethod
kWebViewDependencyRegisteredMethods[] = {
@@ -44,5 +45,10 @@ JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
content::SetContentMainDelegate(new android_webview::AwMainDelegate());
+ // Initialize url_util here while we are still single-threaded, in case we use
+ // CookieManager before initializing Chromium (which would normally have done
+ // this). It's safe to call this multiple times.
+ url_util::Initialize();
+
return JNI_VERSION_1_4;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698