Clearing timer in Firefly shutdown is racy and not needed

RESOLVED FIXED

Status

()

Firefox for Android
Screencasting
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: mfinkle, Assigned: mfinkle)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(firefox33 fixed, firefox34 fixed, fennec33+)

Details

Attachments

(1 attachment)

Created attachment 8460743 [details] [diff] [review]
firefly-fix v0.1

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+
(Assignee)

Updated

4 years ago
status-firefox33: --- → affected
status-firefox34: --- → affected
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?
(Assignee)

Updated

4 years ago
status-firefox34: affected → fixed
Attachment #8460743 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee: nobody → mark.finkle
(Assignee)

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.