Closed Bug 1041906 Opened 11 years ago Closed 11 years ago

Replace suspicious use of non-final lock object in GeckoThread with AtomicReference.

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 34

People

(Reporter: ckitching, Assigned: ckitching)

Details

Attachments

(1 file)

Ran into this while doing preparatory work for the overlays backend. GeckoThread uses a non-final lock object and three methods to implement to manage sLaunchState. Let's just use an AtomicReference. (Which I think is equivalent...) Try: https://tbpl.mozilla.org/?tree=Try&rev=2c8cae1c6bfa
Attachment #8460036 - Flags: review?(rnewman)
Try again: https://tbpl.mozilla.org/?tree=Try&rev=461e2d3855b6 ... Still no source level 7, I see.
Comment on attachment 8460036 [details] [diff] [review] finalDodgyLock.patch Review of attachment 8460036 [details] [diff] [review]: ----------------------------------------------------------------- This looks fine to me (modulo Java7 language feature?).
Attachment #8460036 - Flags: review?(rnewman)
Attachment #8460036 - Flags: review?(nchen)
Attachment #8460036 - Flags: review+
Comment on attachment 8460036 [details] [diff] [review] finalDodgyLock.patch Review of attachment 8460036 [details] [diff] [review]: ----------------------------------------------------------------- LGTM ::: mobile/android/base/GeckoThread.java @@ +39,2 @@ > > + private static AtomicReference<LaunchState> sLaunchState = new AtomicReference<>(LaunchState.Launching); Nit: two lines
Attachment #8460036 - Flags: review?(nchen) → review+
Keywords: checkin-needed
Hardware: ARM → All
Don't land the version with the Java 7 feature. It won't compile. Landing the right one (plus nit): https://hg.mozilla.org/integration/fx-team/rev/109d19bf305c
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: