Bug 656881 - Make timer in file_bug534293-slow.sjs not suspectible to early GC. r=jwalden.
authorHenri Sivonen <hsivonen@iki.fi>
Tue, 17 May 2011 10:15:48 +0300
changeset 69593 5ae6761e175bcffa4428335fe515081cba0afdf7
parent 69592 ef9c0d8872cc18cb3d8664083ff7a6d44e38326c
child 69594 14bbc2fa43a7ad1d3d256031e9b1062b60012e6e
push id20038
push userhsivonen@iki.fi
push dateTue, 17 May 2011 07:16:50 +0000
treeherdermozilla-central@5ae6761e175b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalden
bugs656881, 534293
milestone6.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 656881 - Make timer in file_bug534293-slow.sjs not suspectible to early GC. r=jwalden.
parser/htmlparser/tests/mochitest/file_bug534293-slow.sjs
--- a/parser/htmlparser/tests/mochitest/file_bug534293-slow.sjs
+++ b/parser/htmlparser/tests/mochitest/file_bug534293-slow.sjs
@@ -1,12 +1,14 @@
+var timer;
+
 function handleRequest(request, response)
 {
   response.setHeader("Cache-Control", "no-cache", false);
   response.setHeader("Content-Type", "text/javascript", false);
   response.write("ok(true, 'Slow script ran.');");
   response.processAsync();
-  var timer = Components.classes["@mozilla.org/timer;1"]
+  timer = Components.classes["@mozilla.org/timer;1"]
     .createInstance(Components.interfaces.nsITimer);
   timer.initWithCallback(function() {
       response.finish();
     }, 500, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
 }