Skip to content

Commit

Permalink
Android: enable chromium linker on the shells.
Browse files Browse the repository at this point in the history
Chromium linker has been enabled for the full chrome,
and should also be exercised by content / chrome shells.

BUG=382485

Review URL: https://codereview.chromium.org/329223002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277892 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
bulach@chromium.org committed Jun 17, 2014
1 parent 61664cb commit 79dfb8b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
19 changes: 14 additions & 5 deletions base/android/java/src/org/chromium/base/library_loader/Linker.java
Original file line number Diff line number Diff line change
Expand Up @@ -474,15 +474,24 @@ public static void finishLibraryLoad() {
public static void useSharedRelros(Bundle bundle) {
// Ensure the bundle uses the application's class loader, not the framework
// one which doesn't know anything about LibInfo.
if (bundle != null)
// Also, hold a fresh copy of it so the caller can't recycle it.
Bundle clonedBundle = null;
if (bundle != null) {
bundle.setClassLoader(LibInfo.class.getClassLoader());

if (DEBUG) Log.i(TAG, "useSharedRelros() called with " + bundle);

clonedBundle = new Bundle(LibInfo.class.getClassLoader());
Parcel p = Parcel.obtain();
bundle.writeToParcel(p, 0);
clonedBundle.readFromParcel(p);
p.recycle();
}
if (DEBUG) {
Log.i(TAG, "useSharedRelros() called with " + bundle +
",cloned " + clonedBundle);
}
synchronized (Linker.class) {
// Note that in certain cases, this can be called before
// initServiceProcess() in service processes.
sSharedRelros = bundle;
sSharedRelros = clonedBundle;
// Tell any listener blocked in finishLibraryLoad() about it.
Linker.class.notifyAll();
}
Expand Down
7 changes: 7 additions & 0 deletions chrome/chrome_android.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@
'additional_input_paths': [
'<@(chrome_android_pak_output_resources)',
],
'conditions': [
['component != "shared_library" and target_arch != "arm64" and target_arch != "x64"', {
# Only enable the chromium linker on regular builds, since the
# component build crashes on Android 4.4. See b/11379966
'use_chromium_linker': '1',
}],
],
},
'includes': [ '../build/java_apk.gypi', ],
},
Expand Down
5 changes: 5 additions & 0 deletions content/content_shell.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,11 @@
'<(PRODUCT_DIR)/icudtl.dat',
],
}],
['component != "shared_library" and target_arch != "arm64" and target_arch != "x64"', {
# Only enable the chromium linker on regular builds, since the
# component build crashes on Android 4.4. See b/11379966
'use_chromium_linker': '1',
}],
],
},
'conditions': [
Expand Down

0 comments on commit 79dfb8b

Please sign in to comment.