Unrooted timers are now reported in the log instead of as a JS warning, to fix a crash when dumping the stack during a garbage collection.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4115 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Jens Ayton 2011-01-21 22:44:24 +00:00
parent c2059960be
commit 591878e4da

View File

@ -320,7 +320,7 @@ static void TimerFinalize(JSContext *context, JSObject *this)
{
if ([timer isScheduled])
{
OOJSReportWarning(context, @"Timer %@ is being garbage-collected while still running. You must keep a reference to all running timers, or they will stop unpredictably!", timer);
OOLogWARN(@"script.javaScript.unrootedTimer", @"Timer %@ is being garbage-collected while still running. You must keep a reference to all running timers, or they will stop unpredictably!", timer);
}
[timer release];
JS_SetPrivate(context, this, NULL);