What steps will reproduce the problem?
1. Set a timer with setTimeout, and store the returned object:
var timer = setTimeout(function() {}, 100);
2. Clear the timer after the tiemout has passed:
clearTimeout(timer);
What is the expected output? What do you see instead?
Expected: Timer is cleared without problems. Instead, a NullPointerException is
thrown.
What version of the product are you using? On what operating system?
1.0.2rc1 on Lucid Lynx (Ubuntu 10.04)
Please provide any additional information below.
clearTimeout (clearTimer in the Java code) doesn't check whether
GlobalData.currentQueuedTasks.remove() returns null (which it would if the task
has run, since TimerTask.run removes the timer from currentQueuedTasks).
Attached is a patch to fix this.
Original issue reported on code.google.com by remoun.metyas on 30 Jul 2010 at 12:02
Original issue reported on code.google.com by
remoun.metyas
on 30 Jul 2010 at 12:02Attachments: