Closed Bug 2021365 Opened 8 months ago Closed 8 months ago

Android 17 MessageQueue behavior change could break assumptions in native code

Categories

(GeckoView :: General, task)

All
Android
task

Tracking

(firefox151 fixed)

RESOLVED FIXED
151 Branch
Tracking Status
firefox151 --- fixed

People

(Reporter: mcarare, Assigned: m_kato)

References

Details

(Whiteboard: [fxdroid][group6] )

Attachments

(1 external file)

See investigation results for MessageQueue behaviour changes: https://bugzilla.mozilla.org/show_bug.cgi?id=2018171#c3. The conclusions need to be validated and code might need changes in other files besides the mentioned AndroidBridge.cpp file.

Extra technical docs: https://android-developers.googleblog.com/2026/02/under-hood-android-17s-lock-free.html
https://developer.android.com/about/versions/17/changes/messagequeue

Blocks: 2017262

mMessages is deprecated. MessageQueue.isIdle() on legacy message queue checks whether mMessages is empty and next message needs to call pool. I guess that we can replace mMessages with isIdle() call.

Actually, we use mMessage private field of MessageQueue object
whether message queue on Gecko thread is idle or not. Next Android
will be that mMessage is always null according to Android 17
changes [*].

Android 6 or later has idle method, so we should use it instead.

Assignee: nobody → m_kato
Status: NEW → ASSIGNED
Pushed by m_kato@ga2.so-net.ne.jp: https://github.com/mozilla-firefox/firefox/commit/452c696e0ab4 https://hg.mozilla.org/integration/autoland/rev/fd6d00cc764d Use MessageQueue.isIdle instead of MessageQueue.mMessage. r=geckoview-reviewers,mcarare,jonalmeida
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch
See Also: → 2018171
Whiteboard: [fxdroid][group6]
See Also: → 2089609
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: