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

Unified Diff: base/android/java/src/org/chromium/base/library_loader/Linker.java

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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/java/src/org/chromium/base/library_loader/Linker.java
diff --git a/base/android/java/src/org/chromium/base/library_loader/Linker.java b/base/android/java/src/org/chromium/base/library_loader/Linker.java
index 41104f0453e7acc0631a3d535ed3bbe3ae30c725..997b67c4b024b189a55dc9546b71d1032e25926b 100644
--- a/base/android/java/src/org/chromium/base/library_loader/Linker.java
+++ b/base/android/java/src/org/chromium/base/library_loader/Linker.java
@@ -196,6 +196,8 @@ public class Linker {
private static boolean sRelroSharingSupported = false;
// Set to true if this runs in the browser process. Disabled by initServiceProcess().
+ // TODO(petrcermak): This flag can be incorrectly set to false (even though this might run in
+ // the browser process) on low-memory devices.
private static boolean sInBrowserProcess = true;
// Becomes true to indicate this process needs to wait for a shared RELRO in
@@ -230,6 +232,7 @@ public class Linker {
System.loadLibrary(TAG);
} catch (UnsatisfiedLinkError e) {
// In a component build, the ".cr" suffix is added to each library name.
+ Log.w(TAG, "Couldn't load lib" + TAG + ".so, trying lib" + TAG + ".cr.so");
System.loadLibrary(TAG + ".cr");
}
sRelroSharingSupported = nativeCanUseSharedRelro();
@@ -382,19 +385,6 @@ public class Linker {
}
/**
- * Call this method to determine if the linker is running in the browser
- * process.
- *
- * @return true if the linker is running in the browser process.
- */
- public static boolean isInBrowserProcess() {
- synchronized (Linker.class) {
- ensureInitializedLocked();
- return sInBrowserProcess;
- }
- }
-
- /**
* Call this method to determine if the chromium project must load
* the library directly from the zip file.
*/
@@ -838,6 +828,7 @@ public class Linker {
* @return true if supported.
*/
public static boolean checkLibraryLoadFromApkSupport(String apkFile) {
+ assert apkFile != null;
synchronized (Linker.class) {
ensureInitializedLocked();

Powered by Google App Engine
This is Rietveld 408576698