forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
android: Make a special ZygotePreload for Trichrome
This is needed to avoid hardcoding "libmonochrome" in //content, as discussed in http://crrev.com/c/3165931. Also pull the guard flag from the main change to make it clear how the two preloads are going to differ. Bug: 1154224 Change-Id: If4b2606fe3e2c902854f235d6e83a85d4d0805ce Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3172621 Reviewed-by: Bo <boliu@chromium.org> Reviewed-by: Andrew Grieve <agrieve@chromium.org> Commit-Queue: Egor Pasko <pasko@chromium.org> Cr-Commit-Position: refs/heads/main@{#924392}
- Loading branch information
Showing
11 changed files
with
55 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
chrome/android/java/src/org/chromium/chrome/app/TrichromeZygotePreload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2021 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
package org.chromium.chrome.app; | ||
|
||
import android.content.pm.ApplicationInfo; | ||
|
||
import org.chromium.base.library_loader.LibraryLoader; | ||
import org.chromium.chrome.browser.ProductConfig; | ||
import org.chromium.content_public.app.ZygotePreload; | ||
|
||
/** | ||
* The {@link ZygotePreload} allowing to use the ModernLinker when running Trichrome. | ||
*/ | ||
public class TrichromeZygotePreload extends ZygotePreload { | ||
@Override | ||
public void doPreload(ApplicationInfo appInfo) { | ||
// The ModernLinker is only needed when the App Zygote intends to create the RELRO region. | ||
boolean useModernLinker = ProductConfig.USE_MODERN_LINKER | ||
&& !LibraryLoader.mainProcessIntendsToProvideRelroFd(); | ||
doPreloadCommon(appInfo, useModernLinker); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters