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

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

Issue 1745623002: Fix SELinux violation when opening Chrome on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@movetestonlytofixture
Patch Set: nyquist comments Created 4 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/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 bff22c8cc3f7e024a98ce200f5fdaaf421cff058..7716a8d9f734e84ae0cfe86d1bafb15a2e70b284 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
@@ -62,9 +62,6 @@ class ModernLinker extends Linker {
// The map of libraries that are currently loaded in this process.
private HashMap<String, LibInfo> mLoadedLibraries = null;
- // The directory used to hold shared RELRO data files. Set up by prepareLibraryLoad().
- private String mDataDirectory = null;
-
// Private singleton constructor, and singleton factory method.
private ModernLinker() { }
static Linker create() {
@@ -122,9 +119,6 @@ class ModernLinker extends Linker {
// Create an empty loaded libraries map.
mLoadedLibraries = new HashMap<String, LibInfo>();
- // Retrieve the data directory from base.
- mDataDirectory = PathUtils.getDataDirectory(null);
-
// Start the current load address at the base load address.
mCurrentLoadAddress = mBaseLoadAddress;
@@ -394,7 +388,7 @@ class ModernLinker extends Linker {
// We are in the browser, and with a current load address that indicates that
// there is enough address space for shared RELRO to operate. Create the
// shared RELRO, and store it in the map.
- String relroPath = mDataDirectory + "/RELRO:" + libFilePath;
+ String relroPath = PathUtils.getDataDirectory(null) + "/RELRO:" + libFilePath;
if (nativeCreateSharedRelro(dlopenExtPath,
mCurrentLoadAddress, relroPath, libInfo)) {
mSharedRelros.put(dlopenExtPath, libInfo);

Powered by Google App Engine
This is Rietveld 408576698