Closed Bug 1567232 Opened 5 years ago Closed 5 years ago

Add extra proguard rules for R8 compatibility

Categories

(GeckoView :: General, enhancement)

All
Android
enhancement
Not set
normal

Tracking

(firefox68 wontfix, firefox69 wontfix, firefox70 fixed)

RESOLVED FIXED
mozilla70
Tracking Status
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- fixed

People

(Reporter: mortimergoro, Assigned: mortimergoro)

Details

Attachments

(2 files)

R8 is replacing Proguard in Android tools. I'm working on enabling R8 minification for Firefox Reality and found some problems with the GV library.

Crash related to not registering a native method correctly

 Failed to register native method org.mozilla.gecko.process.GeckoProcessManager.nativeGetEditableParent(Lorg/mozilla/gecko/IGeckoEditableChild;JJ)V in base.apk
----- class 'Lorg/mozilla/gecko/process/GeckoProcessManager;' cl=0x18f82068 -----
  objectSize=256 (120 from super)
  access=0x0000.0011
  super='java.lang.Class<h.c.a.e.g>' (cl=0x18f82068)
  vtable (4 entries, 3 in super):
     0: int org.mozilla.gecko.process.GeckoProcessManager.a(java.lang.String, java.lang.String[], int, int, int, int, int, boolean, android.os.RemoteException)
     1: org.mozilla.gecko.process.GeckoProcessManager$a org.mozilla.gecko.process.GeckoProcessManager.a(java.lang.String)
     2: void org.mozilla.gecko.process.GeckoProcessManager.a(h.c.a.E, long, long)
     3: void org.mozilla.gecko.process.GeckoProcessManager.a(java.lang.String[])
  direct methods (5 entries):
     0: void org.mozilla.gecko.process.GeckoProcessManager.<clinit>()
     1: void org.mozilla.gecko.process.GeckoProcessManager.<init>()
     2: void org.mozilla.gecko.process.GeckoProcessManager.nativeGetEditableParent(h.c.a.E, long, long)
     3: void org.mozilla.gecko.process.GeckoProcessManager.setEditableChildParent(h.c.a.E, h.c.a.H)
     4: int org.mozilla.gecko.process.GeckoProcessManager.start(java.lang.String, java.lang.String[], int, int, int, int, int)
  static fields (1 entries):
     0: org.mozilla.gecko.process.GeckoProcessManager org.mozilla.gecko.process.GeckoProcessManager.a
  instance fields (1 entries):
     0: b.d.i org.mozilla.gecko.process.GeckoProcessManager.b
Failed to register native method 

And also a JNI error with this message:

FATAL JNI ERROR! FindClass("org/mozilla/gecko/mozglue/JNIObject") failed. Does the class require a newer API version? Or did ProGuard optimize away something it shouldn't have?
Assignee: nobody → imanol

Summary Add extra proguard rules for R8 compatibility.:

Pushed by igorostizaga@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/79c535f1c30e
Add extra proguard rules for R8 compatibility. r=agi
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70

68=fix-optional because I don't think we need to uplift to GV 69 Beta if this bug doesn't affect Fenix. FxR still uses GV Nightly.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

We found some a new crash related to R8 when playing media: https://crash-stats.mozilla.com/report/index/308c9afa-c805-42b9-a354-cef020190722

Add more proguard rules for R8 compatibility

Pushed by igorostizaga@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3d1a7f0243d3
Add more proguard rules for R8 compatibility. r=agi,rbarker
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: