-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update/port patches for 127.0.6533.104.0
- Loading branch information
1 parent
5d06d5e
commit f69b80e
Showing
7 changed files
with
238 additions
and
17 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
96 changes: 96 additions & 0 deletions
96
patches/0188-Fix-chrome-target-generation-when-skip_secondary_abi.patch
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,96 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Zoraver Kang <Zoraver@users.noreply.github.com> | ||
Date: Sun, 28 Jul 2024 12:19:36 -0400 | ||
Subject: [PATCH] Fix chrome target generation when skip_secondary_abi_for_cq | ||
is set | ||
|
||
--- | ||
chrome/android/BUILD.gn | 58 +++++++++++++++++++++++------------------ | ||
1 file changed, 33 insertions(+), 25 deletions(-) | ||
|
||
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn | ||
index 9558b3b100166..05bf82a09e90c 100644 | ||
--- a/chrome/android/BUILD.gn | ||
+++ b/chrome/android/BUILD.gn | ||
@@ -4170,20 +4170,24 @@ if (current_toolchain == default_toolchain && | ||
if (enable_libs_and_assets_verification) { | ||
if (android_64bit_target_cpu) { | ||
deps += [ | ||
- ":monochrome_64_32_public_bundle_validate_libs_and_assets", | ||
- ":trichrome_chrome_32_64_bundle_validate_libs_and_assets", | ||
- ":trichrome_chrome_32_bundle_validate_libs_and_assets", | ||
- ":trichrome_chrome_64_32_bundle_validate_libs_and_assets", | ||
":trichrome_chrome_64_bundle_validate_libs_and_assets", | ||
- ":trichrome_library_32_64_apk_validate_libs_and_assets", | ||
- ":trichrome_library_32_apk_validate_libs_and_assets", | ||
- ":trichrome_library_64_32_apk_validate_libs_and_assets", | ||
":trichrome_library_64_apk_validate_libs_and_assets", | ||
- "//android_webview:trichrome_webview_32_64_bundle_validate_libs_and_assets", | ||
- "//android_webview:trichrome_webview_32_bundle_validate_libs_and_assets", | ||
- "//android_webview:trichrome_webview_64_32_bundle_validate_libs_and_assets", | ||
"//android_webview:trichrome_webview_64_bundle_validate_libs_and_assets", | ||
] | ||
+ if (!skip_secondary_abi_for_cq) { | ||
+ deps += [ | ||
+ ":monochrome_64_32_public_bundle_validate_libs_and_assets", | ||
+ ":trichrome_chrome_32_64_bundle_validate_libs_and_assets", | ||
+ ":trichrome_chrome_32_bundle_validate_libs_and_assets", | ||
+ ":trichrome_chrome_64_32_bundle_validate_libs_and_assets", | ||
+ ":trichrome_library_32_64_apk_validate_libs_and_assets", | ||
+ ":trichrome_library_32_apk_validate_libs_and_assets", | ||
+ ":trichrome_library_64_32_apk_validate_libs_and_assets", | ||
+ "//android_webview:trichrome_webview_32_64_bundle_validate_libs_and_assets", | ||
+ "//android_webview:trichrome_webview_32_bundle_validate_libs_and_assets", | ||
+ "//android_webview:trichrome_webview_64_32_bundle_validate_libs_and_assets", | ||
+ ] | ||
+ } | ||
} else { | ||
deps += [ | ||
":${_main_monochrome_public_bundle_target}_validate_libs_and_assets", | ||
@@ -4196,27 +4200,31 @@ if (current_toolchain == default_toolchain && | ||
if (enable_manifest_verification) { | ||
if (android_64bit_target_cpu) { | ||
deps += [ | ||
- ":monochrome_32_64_public_bundle__base_bundle_module_validate_android_manifest", | ||
- ":monochrome_32_public_bundle__base_bundle_module_validate_android_manifest", | ||
- ":monochrome_64_32_public_bundle_validate_manifests", | ||
- ":monochrome_64_32_public_bundle_validate_proguard_config", | ||
":monochrome_64_public_bundle__base_bundle_module_validate_android_manifest", | ||
- ":trichrome_chrome_32_64_bundle__base_bundle_module_validate_android_manifest", | ||
- ":trichrome_chrome_32_bundle__base_bundle_module_validate_android_manifest", | ||
- ":trichrome_chrome_64_32_bundle__base_bundle_module_validate_android_manifest", | ||
":trichrome_chrome_64_bundle__base_bundle_module_validate_android_manifest", | ||
- ":trichrome_library_32_64_apk_validate_android_manifest", | ||
- ":trichrome_library_32_apk_validate_android_manifest", | ||
- ":trichrome_library_64_32_apk_validate_android_manifest", | ||
":trichrome_library_64_apk_validate_android_manifest", | ||
- "//android_webview:system_webview_32_64_base_bundle_module_validate_android_manifest", | ||
- "//android_webview:system_webview_32_base_bundle_module_validate_android_manifest", | ||
"//android_webview:system_webview_64_base_bundle_module_validate_android_manifest", | ||
- "//android_webview:trichrome_webview_32_64_base_bundle_module_validate_android_manifest", | ||
- "//android_webview:trichrome_webview_32_base_bundle_module_validate_android_manifest", | ||
- "//android_webview:trichrome_webview_64_32_base_bundle_module_validate_android_manifest", | ||
"//android_webview:trichrome_webview_64_base_bundle_module_validate_android_manifest", | ||
] | ||
+ if (!skip_secondary_abi_for_cq) { | ||
+ deps += [ | ||
+ ":monochrome_32_64_public_bundle__base_bundle_module_validate_android_manifest", | ||
+ ":monochrome_32_public_bundle__base_bundle_module_validate_android_manifest", | ||
+ ":monochrome_64_32_public_bundle_validate_manifests", | ||
+ ":monochrome_64_32_public_bundle_validate_proguard_config", | ||
+ ":trichrome_chrome_32_64_bundle__base_bundle_module_validate_android_manifest", | ||
+ ":trichrome_chrome_32_bundle__base_bundle_module_validate_android_manifest", | ||
+ ":trichrome_chrome_64_32_bundle__base_bundle_module_validate_android_manifest", | ||
+ ":trichrome_library_32_64_apk_validate_android_manifest", | ||
+ ":trichrome_library_32_apk_validate_android_manifest", | ||
+ ":trichrome_library_64_32_apk_validate_android_manifest", | ||
+ "//android_webview:system_webview_32_64_base_bundle_module_validate_android_manifest", | ||
+ "//android_webview:system_webview_32_base_bundle_module_validate_android_manifest", | ||
+ "//android_webview:trichrome_webview_32_64_base_bundle_module_validate_android_manifest", | ||
+ "//android_webview:trichrome_webview_32_base_bundle_module_validate_android_manifest", | ||
+ "//android_webview:trichrome_webview_64_32_base_bundle_module_validate_android_manifest", | ||
+ ] | ||
+ } | ||
} else { | ||
deps += [ | ||
":${_main_monochrome_public_bundle_target}_validate_manifests", |
74 changes: 74 additions & 0 deletions
74
patches/0189-Always-start-child-processes-in-jitless-mode-when-ex.patch
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,74 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: fgei <fgei@gmail.com> | ||
Date: Tue, 20 Feb 2024 04:05:46 +0000 | ||
Subject: [PATCH] Always start child processes in jitless mode when execmem is | ||
blocked | ||
|
||
--- | ||
.../library_loader/LibraryLoaderHooks.java | 31 +++++++++++++++++++ | ||
base/base_android_library_ext.gni | 1 + | ||
2 files changed, 32 insertions(+) | ||
|
||
diff --git a/base/android/java/src/org/chromium/base/library_loader/LibraryLoaderHooks.java b/base/android/java/src/org/chromium/base/library_loader/LibraryLoaderHooks.java | ||
index b1a621f62770a..9f7482f21d912 100644 | ||
--- a/base/android/java/src/org/chromium/base/library_loader/LibraryLoaderHooks.java | ||
+++ b/base/android/java/src/org/chromium/base/library_loader/LibraryLoaderHooks.java | ||
@@ -2,8 +2,15 @@ package org.chromium.base.library_loader; | ||
|
||
import android.content.Context; | ||
|
||
+import org.chromium.base.CommandLine; | ||
+import org.chromium.base.command_line.VanadiumCommandLineUtils; | ||
import org.chromium.base.config.VanadiumConfigBridge; | ||
|
||
+import java.util.ArrayList; | ||
+import java.util.HashSet; | ||
+ | ||
+import app.vanadium.ext.CustomOSApis; | ||
+ | ||
class LibraryLoaderHooks { | ||
|
||
static void onSetLibraryProcessType(Context appContext, @LibraryProcessType int type) { | ||
@@ -12,6 +19,30 @@ class LibraryLoaderHooks { | ||
|
||
static void onBeforeCommandLineSwitchLocked(Context appContext, @LibraryProcessType int type) { | ||
VanadiumConfigBridge.applyFlagFromConfigs(appContext, type); | ||
+ switch (type) { | ||
+ case LibraryProcessType.PROCESS_BROWSER: | ||
+ case LibraryProcessType.PROCESS_WEBVIEW: | ||
+ case LibraryProcessType.PROCESS_WEBVIEW_NONEMBEDDED: | ||
+ return; | ||
+ case LibraryProcessType.PROCESS_CHILD: | ||
+ case LibraryProcessType.PROCESS_WEBVIEW_CHILD: | ||
+ if (CommandLine.getInstance() != null) { | ||
+ boolean checkForOSConfigForJitless = | ||
+ !VanadiumCommandLineUtils.getCommaDelimitedSwitchValue( | ||
+ "disable-features").contains("check-os-config-for-jitless"); | ||
+ if (CustomOSApis.isExecmemBlocked() && checkForOSConfigForJitless) { | ||
+ String jsFlagsName = "js-flags"; | ||
+ HashSet<String> jsFlags = new HashSet<>( | ||
+ VanadiumCommandLineUtils.getCommaDelimitedSwitchValue(jsFlagsName)); | ||
+ jsFlags.add("--jitless"); | ||
+ VanadiumCommandLineUtils.setCommaDelimitedSwitchValue( | ||
+ jsFlagsName, new ArrayList<>(jsFlags)); | ||
+ } | ||
+ } | ||
+ break; | ||
+ default: | ||
+ throw new IllegalStateException(); | ||
+ } | ||
} | ||
|
||
static void onSubsequentCommandLineSwitchLockedCheck(Context appContext, @LibraryProcessType int type) { | ||
diff --git a/base/base_android_library_ext.gni b/base/base_android_library_ext.gni | ||
index 80fb1746d8aa9..5d007a5e9dcf8 100644 | ||
--- a/base/base_android_library_ext.gni | ||
+++ b/base/base_android_library_ext.gni | ||
@@ -19,6 +19,7 @@ base_library_loader_java_ext_java_sources = [ | ||
|
||
base_library_loader_java_ext_deps = [ | ||
"//vanadium/android_config/proto:browser_config_parser_java", | ||
+ "//vanadium/ext/custom_os:custom_os_apis_java", | ||
] | ||
|
||
base_library_loader_java_ext_srcjar_deps = [ |
26 changes: 26 additions & 0 deletions
26
patches/0190-Only-enable-shadow_call_stack-on-android-arm64-targe.patch
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,26 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: fgei <fgei@gmail.com> | ||
Date: Mon, 12 Aug 2024 14:07:37 +0000 | ||
Subject: [PATCH] Only enable shadow_call_stack on android arm64 target | ||
|
||
--- | ||
build/config/compiler/BUILD.gn | 6 ++++++ | ||
1 file changed, 6 insertions(+) | ||
|
||
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn | ||
index 77b26305a0d8a..8b2ccc897f9ce 100644 | ||
--- a/build/config/compiler/BUILD.gn | ||
+++ b/build/config/compiler/BUILD.gn | ||
@@ -339,6 +339,12 @@ config("compiler") { | ||
# -------------------------------- | ||
cflags += [ "-fno-strict-aliasing" ] # See http://crbug.com/32204 | ||
|
||
+ if (enable_shadow_call_stack) { | ||
+ if (!is_android || current_cpu != "arm64") { | ||
+ enable_shadow_call_stack = false | ||
+ } | ||
+ } | ||
+ | ||
# Stack protection. ShadowCallStack and Stack protector address the same | ||
# problems. Therefore, we only enable one or the other. Clang advertises SCS as | ||
# a stronger alternative to StackProtector, so we give SCS precedence over SP. |
22 changes: 22 additions & 0 deletions
22
patches/0191-Disable-predictive-back-gesture-for-Vanadium.patch
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,22 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: fgei <fgei@gmail.com> | ||
Date: Tue, 13 Aug 2024 06:07:33 +0000 | ||
Subject: [PATCH] Disable predictive back gesture for Vanadium | ||
|
||
--- | ||
chrome/android/java/AndroidManifest.xml | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml | ||
index bb79024a26c71..18a5f747b63ed 100644 | ||
--- a/chrome/android/java/AndroidManifest.xml | ||
+++ b/chrome/android/java/AndroidManifest.xml | ||
@@ -204,7 +204,7 @@ by a child template that "extends" this file. | ||
android:networkSecurityConfig="@xml/network_security_config" | ||
android:allowAudioPlaybackCapture="false" | ||
android:appComponentFactory="org.chromium.chrome.browser.base.SplitCompatAppComponentFactory" | ||
- android:enableOnBackInvokedCallback="true" | ||
+ android:enableOnBackInvokedCallback="false" | ||
{% block extra_application_attributes %}{% endblock %}> | ||
|
||
{% if channel in ['canary', 'dev', 'default'] %} |