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

Unified Diff: content/app/android/library_loader_hooks.cc

Issue 11567061: Throw exception when initialization failed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove process initialization in ContentViewCore constructor Created 7 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
Index: content/app/android/library_loader_hooks.cc
diff --git a/content/app/android/library_loader_hooks.cc b/content/app/android/library_loader_hooks.cc
index a60155ff67bc92a79b260101ac6835ab5bbf8a1f..5919c9af9982224637797991ac7d70a8e8a710bb 100644
--- a/content/app/android/library_loader_hooks.cc
+++ b/content/app/android/library_loader_hooks.cc
@@ -22,6 +22,7 @@
#include "content/common/android/common_jni_registrar.h"
#include "content/common/android/command_line.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/result_codes.h"
#include "media/base/android/media_jni_registrar.h"
#include "net/android/net_jni_registrar.h"
#include "ui/android/ui_jni_registrar.h"
@@ -34,7 +35,7 @@ base::AtExitManager* g_at_exit_manager = NULL;
namespace content {
-static jboolean LibraryLoadedOnMainThread(JNIEnv* env, jclass clazz,
+static jint LibraryLoadedOnMainThread(JNIEnv* env, jclass clazz,
jobjectArray init_command_line) {
joth 2013/01/08 21:20:45 indent wrong.
InitNativeCommandLineFromJavaArray(env, init_command_line);
@@ -62,30 +63,30 @@ static jboolean LibraryLoadedOnMainThread(JNIEnv* env, jclass clazz,
<< ", default verbosity = " << logging::GetVlogVerbosity();
if (!base::android::RegisterJni(env))
- return JNI_FALSE;
+ return RESULT_CODE_FAILED_TO_REGISTER_JNI;
if (!net::android::RegisterJni(env))
- return JNI_FALSE;
+ return RESULT_CODE_FAILED_TO_REGISTER_JNI;
if (!ui::RegisterJni(env))
- return JNI_FALSE;
+ return RESULT_CODE_FAILED_TO_REGISTER_JNI;
if (!content::android::RegisterCommonJni(env))
- return JNI_FALSE;
+ return RESULT_CODE_FAILED_TO_REGISTER_JNI;
if (!content::android::RegisterBrowserJni(env))
- return JNI_FALSE;
+ return RESULT_CODE_FAILED_TO_REGISTER_JNI;
if (!content::android::RegisterAppJni(env))
- return JNI_FALSE;
+ return RESULT_CODE_FAILED_TO_REGISTER_JNI;
if (!media::RegisterJni(env))
- return JNI_FALSE;
+ return RESULT_CODE_FAILED_TO_REGISTER_JNI;
if (!gfx::RegisterJni(env))
- return JNI_FALSE;
+ return RESULT_CODE_FAILED_TO_REGISTER_JNI;
joth 2013/01/08 21:20:45 I don't think it's adding much to reuse result_cod
michaelbai 2013/01/09 00:14:00 I think it is better for user to find the error in
- return JNI_TRUE;
+ return 0;
}
void LibraryLoaderExitHook() {

Powered by Google App Engine
This is Rietveld 408576698