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

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

Issue 1684123002: Revert of Fix SELinux violation when opening Chrome on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java » ('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 152965b405511dccf243462c9d36f18c1194f924..5abc4e54b0f61d7d4885ddaa3f501b7b00339808 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
@@ -61,6 +61,9 @@
// 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() {
@@ -117,6 +120,9 @@
// 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;
@@ -391,7 +397,7 @@
// 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 = PathUtils.getDataDirectory(null) + "/RELRO:" + libFilePath;
+ String relroPath = mDataDirectory + "/RELRO:" + libFilePath;
if (nativeCreateSharedRelro(dlopenExtPath,
mCurrentLoadAddress, relroPath, libInfo)) {
mSharedRelros.put(dlopenExtPath, libInfo);
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698