Closed Bug 1042513 Opened 9 years ago Closed 9 years ago

Clearing timer in Firefly shutdown is racy and not needed


(Firefox for Android Graveyard :: Screencasting, defect)

Not set


(firefox33 fixed, firefox34 fixed, fennec33+)

Tracking Status
firefox33 --- fixed
firefox34 --- fixed
fennec 33+ ---


(Reporter: mfinkle, Assigned: mfinkle)



(1 file)

Attached patch firefly-fix v0.1Splinter Review
I get an exception almost every time I try to shutdown a Firefly video casting session:
E/GeckoConsole(29571): [JavaScript Error: "TypeError: this._info_timer.clear is not a function" {file: "resource://gre/modules/FireflyApp.jsm" line: 307}]

Looking at this in the debugger, this.info_timer is null but flips as I step over to the next line. It's racing with the timer's timeout itself.

Thinking about this more, shutdown is only requesting a shutdown from the receiver. It's not any different than requesting a pause or play, and we don't kill the timer before those. There should be no reason we need to clear the timer and removing it doesn't show any errors - but does allow a normal shutdown to happen.
Attachment #8460743 - Flags: review?(blassey.bugs)
I should note that the exception I get when attempting to shutdown means the video session does not shutdown. I have to keep tapping the button until I will the race.

With the patch, it's not a problem.
Attachment #8460743 - Flags: review?(blassey.bugs) → review+
Comment on attachment 8460743 [details] [diff] [review]
firefly-fix v0.1

Approval Request Comment
[Feature/regressing bug #]:
[User impact if declined]: Video casting session won't shutdown
[Describe test coverage new/current, TBPL]: Working fine in Nightly
[Risks and why]: low
[String/UUID change made/needed]: none
Attachment #8460743 - Flags: approval-mozilla-aurora?
Attachment #8460743 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee: nobody → mark.finkle
Closed: 9 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.