mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 627015 - Hold on to a reference to the timer, so it doesn't get collected from under us. over-the-shoulder-r=jrmuizel,jdm
This commit is contained in:
parent
f8bddd9a2f
commit
3c75d08723
@ -16,6 +16,8 @@ function getFileStream(filename)
|
||||
return fileStream;
|
||||
}
|
||||
|
||||
var gTimer;
|
||||
|
||||
function handleRequest(request, response)
|
||||
{
|
||||
response.processAsync();
|
||||
@ -26,8 +28,8 @@ function handleRequest(request, response)
|
||||
response.bodyOutputStream.writeFrom(firststream, firststream.available())
|
||||
firststream.close();
|
||||
|
||||
var timer = Components.classes["@mozilla.org/timer;1"].createInstance(Components.interfaces.nsITimer);
|
||||
timer.initWithCallback(function()
|
||||
gTimer = Components.classes["@mozilla.org/timer;1"].createInstance(Components.interfaces.nsITimer);
|
||||
gTimer.initWithCallback(function()
|
||||
{
|
||||
var secondstream = getFileStream("threeframes-end.gif");
|
||||
response.bodyOutputStream.writeFrom(secondstream, secondstream.available())
|
||||
|
Loading…
Reference in New Issue
Block a user