--- a/webengine/osswebengine/WebCore/bindings/js/GCController.cpp Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebCore/bindings/js/GCController.cpp Thu Aug 19 10:58:56 2010 +0300
@@ -41,19 +41,38 @@
GCController::GCController()
: m_GCTimer(this, &GCController::gcTimerFired)
+ , m_exitInProgress(false)
{
}
void GCController::garbageCollectSoon()
{
- if (!m_GCTimer.isActive())
- m_GCTimer.startOneShot(0);
+ if(!m_exitInProgress)
+ {
+ if (!m_GCTimer.isActive())
+ m_GCTimer.startOneShot(0);
+ }
}
void GCController::gcTimerFired(Timer<GCController>*)
{
- JSLock lock;
- Collector::collect();
+ if(!m_exitInProgress)
+ {
+ JSLock lock;
+ Collector::collect();
+ }
}
-
+
+void GCController::startedExit(TBool aExitStatus)
+ {
+ m_exitInProgress = aExitStatus;
+ if(m_exitInProgress)
+ {
+ KJS::Collector::startedExit(true);
+ if(m_GCTimer.isActive())
+ {
+ m_GCTimer.stop();
+ }
+ }
+ }
} // namespace WebCore