Opened 5 years ago

Closed 3 years ago

#1828 closed defect (fixed)

Ensure any code that uses nsITimer directly maintains a global reference until callback executes

Reported by: simon Owned by: simon
Priority: critical Milestone:
Component: misc Version: 2.1
Keywords: Cc: dstillman

Description

If an nsITimer goes out of scope before its callback executes, it can be garbage collected, and its callback will never get run. This is no longer a problem with setTimeout/Zotero.setTimeout(), but any code that uses nsITimer directly needs to be aware of this.

Change History (2)

comment:1 Changed 5 years ago by simon

In [9487]:

  • Addresses #1828, Ensure any code that uses nsITimer directly maintains a global reference until callback executes
  • Adds an optional runWhenWaiting argument to Zotero.setTimeout(), so that code can be set to run even if Zotero.wait() is in progress

comment:2 Changed 3 years ago by simon

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.