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

Unified Diff: base/android/library_loader/library_loader_hooks.cc

Issue 975253002: refactoring Android Webview JNI_OnLoad interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
Index: base/android/library_loader/library_loader_hooks.cc
diff --git a/base/android/library_loader/library_loader_hooks.cc b/base/android/library_loader/library_loader_hooks.cc
index 97aec8c56ad5c9c9cc758fc74f7ab70c6473580c..e4451156a19de2fb09a41c91de1d6745bec34c71 100644
--- a/base/android/library_loader/library_loader_hooks.cc
+++ b/base/android/library_loader/library_loader_hooks.cc
@@ -123,9 +123,10 @@ void LibraryLoaderExitHook() {
}
bool RegisterLibraryLoaderEntryHook(JNIEnv* env) {
+ // TODO(michaelbai): Remove this after refactoring all dependents.
+ InitAtExitManager();
// We need the AtExitManager to be created at the very beginning.
- g_at_exit_manager = new base::AtExitManager();
-
+ DCHECK(g_at_exit_manager);
return RegisterNativesImpl(env);
}
@@ -142,5 +143,9 @@ LibraryProcessType GetLibraryProcessType(JNIEnv* env) {
Java_LibraryLoader_getLibraryProcessType(env));
}
+void InitAtExitManager() {
Torne 2015/03/11 18:08:29 Why do we need to InitAtExitManager in this way at
michaelbai 2015/03/11 18:29:10 As I said in my previous comment, I am refactoring
+ g_at_exit_manager = new base::AtExitManager();
+}
+
} // namespace android
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698