2011-01-10 Maciej Stachowiak <mjs@apple.com>
[WebKit.git] / Tools / WebKitTestRunner / mac / TestControllerMac.mm
index fee007070569184d72ef0ed5ed46226f5949bbb2..6a4444fd473cd1126caa6dae1ff895814c48f8de 100644 (file)
@@ -52,8 +52,10 @@ void TestController::initializeTestPluginDirectory()
 void TestController::platformRunUntil(bool& done, double timeout)
 {
     CFAbsoluteTime end = CFAbsoluteTimeGetCurrent() + timeout;
+    CFDateRef endDate = CFDateCreate(0, end);
     while (!done && CFAbsoluteTimeGetCurrent() < end)
-        [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]];
+        [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:(NSDate *)endDate];
+    CFRelease(endDate);
 }
 
 void TestController::platformInitializeContext()