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

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

Issue 1314823003: Make Linker.isUsed() static, and clean up the fallout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tiny log tweak, protected->private, rebase to master. Created 5 years, 4 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 | « base/android/java/src/org/chromium/base/library_loader/Linker.java ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/java/src/org/chromium/base/library_loader/ModernLinker.java
diff --git a/base/android/java/src/org/chromium/base/library_loader/ModernLinker.java b/base/android/java/src/org/chromium/base/library_loader/ModernLinker.java
index c17160b8eb831970e6c7608a4a9632f3599280ac..1e365773bbce224b007728eb0669ec204f9beb2f 100644
--- a/base/android/java/src/org/chromium/base/library_loader/ModernLinker.java
+++ b/base/android/java/src/org/chromium/base/library_loader/ModernLinker.java
@@ -70,32 +70,20 @@ class ModernLinker extends Linker {
return new ModernLinker();
}
- // Used internally to initialize the linker's data. Assume lock is held.
+ // Used internally to initialize the linker's data. Assumes lock is held.
private void ensureInitializedLocked() {
assert Thread.holdsLock(mLock);
assert NativeLibraries.sUseLinker;
- // On first call, load libchromium_android_linker.so.
+ // On first call, load libchromium_android_linker.so. Cannot be done in the
+ // constructor because the instance is constructed on the UI thread.
if (!mInitialized) {
- loadLinkerJNILibrary();
+ loadLinkerJniLibrary();
mInitialized = true;
}
}
/**
- * Call this method to determine if this chromium project must
- * use this linker. If not, System.loadLibrary() should be used to load
- * libraries instead.
- */
- @Override
- public boolean isUsed() {
- // Only GYP targets that are APKs and have the 'use_chromium_linker' variable
- // defined as 1 will use this linker. For all others (the default), the
- // auto-generated NativeLibraries.sUseLinker variable will be false.
- return NativeLibraries.sUseLinker;
- }
-
- /**
* Call this method to determine if the linker will try to use shared RELROs
* for the browser process.
*/
« no previous file with comments | « base/android/java/src/org/chromium/base/library_loader/Linker.java ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698