Closed Bug 1227728 Opened 9 years ago Closed 8 years ago

Possible race condition when queuing native calls through GeckoThread

Categories

(Core Graveyard :: Widget: Android, defect)

All
Android
defect
Not set
normal

Tracking

(firefox46 fixed)

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: jchen, Assigned: jchen)

References

Details

Attachments

(1 file)

When queuing native calls through GeckoThread, there can be a race condition such that earlier queued calls are flushed after a later call is made, thus breaking the correct order of calls.
Right now, code that queues native calls through GeckoThread can
encounter a race condition, after the GeckoThread state changes but
before we flush the existing queued calls.  In that case, the new call
will be made before existing queued calls are made, and the order of
calls is disrupted. This patch moves flushing existing calls to before
the state changes, to avoid this race condition.
Attachment #8698186 - Flags: review?(snorp)
Attachment #8698186 - Flags: review?(snorp) → review+
https://hg.mozilla.org/mozilla-central/rev/c3a39bddd521
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: