Closed Bug 641174 Opened 14 years ago Closed 14 years ago

Protect timer in script_bug602838.sjs from being eaten by GC

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: philor, Assigned: philor)

References

Details

Attachments

(1 file)

Attached patch fixSplinter Review
Per http://www.joshmatthews.net/blog/2011/03/nsitimer-anti-pattern/ (and according to what I think was the winning side of an argument I didn't quite follow about this particular case), setting a timer in a function's scope and expecting it to still be alive when it fires is a risky scheme.
Attachment #518916 - Flags: review?(hsivonen)
Comment on attachment 518916 [details] [diff] [review] fix r=me. Pushthisplease!
Attachment #518916 - Flags: review?(hsivonen) → review+
I think we should have a bug to fix all usage of nsITimer. A lot (most) are wrong.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Mounir, see bug 640629.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: