Open Bug 640912 Opened 15 years ago Updated 4 years ago

Fix local scoping of nsITimer in searchCommon.js that is susceptible to GC before firing

Categories

(Thunderbird :: Search, defect)

defect

Tracking

(Not tracked)

People

(Reporter: standard8, Unassigned)

References

()

Details

+++ This bug was initially created as a clone of Bug #640629 +++ When timers are created, there is no extra reference held until they fire. That means that if the variable storing the timer object goes out of scope, it's susceptible to a GC which will destroy the timer without it ever firing. There's an instance of this in searchCommon.js in SearchSupport.observe. It looks like a fallback case, so we probably won't hit it too often, but worth fixing anyway.
hmm. What UI behavior might a user see as a result of a GCed timer? Crash?
(In reply to comment #1) > hmm. What UI behavior might a user see as a result of a GCed timer? Crash? The action just wouldn't complete. In this case the timer is in a call that is handling failure of registration (or deregistration) of the search stuff. So worse case we'd just not disable it in preferences. You're probably also very unlikely to hit it. You've got 200ms from that failure to when the timer fires. We don't do gc that often.
Depends on: 650557
Depends on: 650585
Depends on: 650586
Ah, this bug's number is too similar to bug 649012. Sorry!
No longer depends on: 650557, 650585, 650586
Blocks: 758585
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.