tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

file_bug568470-script.sjs (512B)


      1 var timer = null; // Declare outside to prevent premature GC
      2 
      3 function handleRequest(request, response) {
      4   response.setHeader("Cache-Control", "no-cache", false);
      5   response.setHeader("Content-Type", "text/javascript", false);
      6   response.write("var i = 0;");
      7   response.bodyOutputStream.flush();
      8   response.processAsync();
      9   timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     10   timer.initWithCallback(
     11     function () {
     12       response.finish();
     13     },
     14     500,
     15     Ci.nsITimer.TYPE_ONE_SHOT
     16   );
     17 }