Chromium Code Reviews| Index: base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java |
| diff --git a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java |
| index 79dc8d6bc3f27a6efde1df1f4fb3b3e40a5dfc27..f833abba1ad31443eb68b268edf8faec8b88846b 100644 |
| --- a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java |
| +++ b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java |
| @@ -324,15 +324,6 @@ public class LibraryLoader { |
| } catch (UnsatisfiedLinkError e) { |
| throw new ProcessInitException(LoaderErrors.LOADER_ERROR_NATIVE_LIBRARY_LOAD_FAILED, e); |
| } |
| - // Check that the version of the library we have loaded matches the version we expect |
| - Log.i(TAG, String.format( |
| - "Expected native library version number \"%s\", " |
| - + "actual native library version number \"%s\"", |
| - NativeLibraries.sVersionNumber, |
| - nativeGetVersionNumber())); |
| - if (!NativeLibraries.sVersionNumber.equals(nativeGetVersionNumber())) { |
| - throw new ProcessInitException(LoaderErrors.LOADER_ERROR_NATIVE_LIBRARY_WRONG_VERSION); |
| - } |
| } |
| // The WebView requires the Command Line to be switched over before |
| @@ -374,6 +365,14 @@ public class LibraryLoader { |
| throw new ProcessInitException(LoaderErrors.LOADER_ERROR_FAILED_TO_REGISTER_JNI); |
| } |
| + // Check that the version of the library we have loaded matches the version we expect |
|
Torne
2017/01/03 12:13:50
Why was it necessary to move this? Just curious.
Tobias Sargeant
2017/01/04 00:24:53
The native native library version is set by the in
|
| + Log.i(TAG, String.format("Expected native library version number \"%s\", " |
| + + "actual native library version number \"%s\"", |
| + NativeLibraries.sVersionNumber, nativeGetVersionNumber())); |
| + if (!NativeLibraries.sVersionNumber.equals(nativeGetVersionNumber())) { |
| + throw new ProcessInitException(LoaderErrors.LOADER_ERROR_NATIVE_LIBRARY_WRONG_VERSION); |
| + } |
| + |
| // From now on, keep tracing in sync with native. |
| TraceEvent.registerNativeEnabledObserver(); |