Skip to content

[Chromium] Fix a startup crash with minification on - #2065

Merged
svillar merged 1 commit into
mainfrom
chromium_crash_startup
Sep 2, 2026
Merged

[Chromium] Fix a startup crash with minification on#2065
svillar merged 1 commit into
mainfrom
chromium_crash_startup

Conversation

@svillar

@svillar svillar commented Sep 2, 2026

Copy link
Copy Markdown
Member

Chromium's WindowLayoutInfoListener passes a lambda implementing the platform provided Consumer interface to the system. R8 could not see that the desugared lambda's accept(Object) overrides anything and stripped it, so startup crashes with AbstractMethodError. A classic -keep* rule can fix that because R8 synthesises the lambda class after keep rules are matched. The actual fix is adding an
androidx.window.extensions.core:core dependency in build.gradle.

Apart from that, we're groupping the backend specific rules together, so that it'd be easier to identify which rules are required by Chromium and which ones are Gecko only (actually the rules apply to both but they are not strictly needed for both).

Chromium's WindowLayoutInfoListener passes a lambda implementing the
platform provided Consumer interface to the system. R8 could not see that
the desugared lambda's accept(Object) overrides anything and stripped it,
so startup crashes with AbstractMethodError. A classic -keep* rule can
fix that because R8 synthesises the lambda class after keep rules are
matched. The actual fix is adding an
androidx.window.extensions.core:core dependency in build.gradle.

Apart from that, we're groupping the backend specific rules together, so
that it'd be easier to identify which rules are required by Chromium and
which ones are Gecko only (actually the rules apply to both but they are
not strictly needed for both).
@svillar svillar added this to the v1.9.1 milestone Sep 2, 2026
@svillar svillar added the release_candidate PR that should be part of the next release label Sep 2, 2026

@javifernandez javifernandez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@svillar
svillar merged commit 847e362 into main Sep 2, 2026
24 of 40 checks passed
@svillar
svillar deleted the chromium_crash_startup branch September 2, 2026 14:14
@svillar svillar removed the release_candidate PR that should be part of the next release label Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants