summaryrefslogtreecommitdiff
path: root/chromium/third_party/r8/patches/0003-Allow-access-modification-everywhere.patch
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/r8/patches/0003-Allow-access-modification-everywhere.patch')
-rw-r--r--chromium/third_party/r8/patches/0003-Allow-access-modification-everywhere.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/chromium/third_party/r8/patches/0003-Allow-access-modification-everywhere.patch b/chromium/third_party/r8/patches/0003-Allow-access-modification-everywhere.patch
new file mode 100644
index 00000000000..d0806db23cd
--- /dev/null
+++ b/chromium/third_party/r8/patches/0003-Allow-access-modification-everywhere.patch
@@ -0,0 +1,30 @@
+From 445cc7889a6f470daba1a7056ea32bf9faf3e2d9 Mon Sep 17 00:00:00 2001
+From: Andrew Grieve <agrieve@chromium.org>
+Date: Sun, 31 May 2020 22:09:27 -0400
+Subject: [PATCH 3/3] Allow access modification everywhere
+
+Chrome does not need need -keep to maintain original visibility.
+Loosening this constraint allows for better optimization, and is easier
+than adding ",allowaccessmodification" to every single -keep rule.
+---
+ .../com/android/tools/r8/shaking/AppInfoWithLiveness.java | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/main/java/com/android/tools/r8/shaking/AppInfoWithLiveness.java b/src/main/java/com/android/tools/r8/shaking/AppInfoWithLiveness.java
+index 87bfd9a2d..75bc46e33 100644
+--- a/src/main/java/com/android/tools/r8/shaking/AppInfoWithLiveness.java
++++ b/src/main/java/com/android/tools/r8/shaking/AppInfoWithLiveness.java
+@@ -918,9 +918,7 @@ public class AppInfoWithLiveness extends AppInfoWithClassHierarchy
+
+ public boolean isAccessModificationAllowed(DexReference reference) {
+ assert options().getProguardConfiguration().isAccessModificationAllowed();
+- return keepInfo
+- .getInfo(reference, this)
+- .isAccessModificationAllowed(options().getProguardConfiguration());
++ return true;
+ }
+
+ public boolean isPinned(DexReference reference) {
+--
+2.27.0.278.ge193c7cf3a9-goog
+