Closed Bug 445828 Opened 16 years ago Closed 16 years ago

Trying to re-init a TYPE_REPEATING_SLACK timer causes it to be added to timer thread twice

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bent.mozilla, Assigned: bent.mozilla)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch, v1 (obsolete) (deleted) — Splinter Review
jst found this while reviewing bug 437152. Trying to re-init a TYPE_REPEATING_SLACK timer causes it to be added to timer thread twice. Patch attached that removes a previous instance from the timer thread if it is reinitialized.
Attachment #330083 - Flags: review?(brendan)
Assignee: nobody → bent.mozilla
Status: NEW → ASSIGNED
Version: unspecified → Trunk
Comment on attachment 330083 [details] [diff] [review]
Patch, v1

Did you confirm that the callback added the timer again? Isn't that a bug at some level (if the type is repeating)?

/be
Attachment #330083 - Flags: review?(brendan) → review+
My case was a TYPE_ONE_SHOT timer reinitializing as a TYPE_REPEATING_SLACK. By the time we get to the code in question InitCommon has already updated mType.
Keywords: checkin-needed
Attached patch Patch, v2 (deleted) — Splinter Review
Actually, brendan, I think this patch is better. What do you think?
Attachment #330569 - Flags: review?(brendan)
Comment on attachment 330569 [details] [diff] [review]
Patch, v2

Yes, that is better.

/be
Attachment #330569 - Flags: review?(brendan) → review+
Attachment #330083 - Attachment is obsolete: true
Pushed to moz-central.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: