Title: [115383] trunk/Source/WebCore
- Revision
- 115383
- Author
- [email protected]
- Date
- 2012-04-26 15:53:35 -0700 (Thu, 26 Apr 2012)
Log Message
[GTK] Massive media tests failures since r115288
https://bugs.webkit.org/show_bug.cgi?id=84950
Reviewed by Filip Pizlo.
No new tests.
Since the "cross-platform" WebCore timer is at too high of a level in terms of the layers
of WebKit for JSC to use, we are not currently able to use it in JSC, thus only those
platforms that support CoreFoundation can currently take advantage of the new and improved
GC activity timer. We've restored the old code paths for those platforms that don't have
CF so that they will at least have the same behavior as before when calling garbageCollectSoon.
* bindings/js/GCController.cpp: Added back the old WebCore timer along with some
if-defs that do away with the WebCore timer on platforms that support CoreFoundation.
(WebCore::GCController::GCController):
(WebCore::GCController::garbageCollectSoon):
(WebCore):
(WebCore::GCController::gcTimerFired):
* bindings/js/GCController.h: Ditto.
(GCController):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (115382 => 115383)
--- trunk/Source/WebCore/ChangeLog 2012-04-26 22:42:48 UTC (rev 115382)
+++ trunk/Source/WebCore/ChangeLog 2012-04-26 22:53:35 UTC (rev 115383)
@@ -1,3 +1,27 @@
+2012-04-26 Mark Hahnenberg <[email protected]>
+
+ [GTK] Massive media tests failures since r115288
+ https://bugs.webkit.org/show_bug.cgi?id=84950
+
+ Reviewed by Filip Pizlo.
+
+ No new tests.
+
+ Since the "cross-platform" WebCore timer is at too high of a level in terms of the layers
+ of WebKit for JSC to use, we are not currently able to use it in JSC, thus only those
+ platforms that support CoreFoundation can currently take advantage of the new and improved
+ GC activity timer. We've restored the old code paths for those platforms that don't have
+ CF so that they will at least have the same behavior as before when calling garbageCollectSoon.
+
+ * bindings/js/GCController.cpp: Added back the old WebCore timer along with some
+ if-defs that do away with the WebCore timer on platforms that support CoreFoundation.
+ (WebCore::GCController::GCController):
+ (WebCore::GCController::garbageCollectSoon):
+ (WebCore):
+ (WebCore::GCController::gcTimerFired):
+ * bindings/js/GCController.h: Ditto.
+ (GCController):
+
2012-04-26 Adam Klein <[email protected]>
Don't include V8Proxy.h in ScriptValue.h when V8GCController is all that's required
Modified: trunk/Source/WebCore/bindings/js/GCController.cpp (115382 => 115383)
--- trunk/Source/WebCore/bindings/js/GCController.cpp 2012-04-26 22:42:48 UTC (rev 115382)
+++ trunk/Source/WebCore/bindings/js/GCController.cpp 2012-04-26 22:53:35 UTC (rev 115383)
@@ -49,15 +49,35 @@
}
GCController::GCController()
+#if !USE(CF)
+ : m_GCTimer(this, &GCController::gcTimerFired)
+#endif
{
}
void GCController::garbageCollectSoon()
{
+ // We only use reportAbandonedObjectGraph on systems with CoreFoundation
+ // since it uses a runloop-based timer that is currently only available on
+ // systems with CoreFoundation. If and when the notion of a run loop is pushed
+ // down into WTF so that more platforms can take advantage of it, we will be
+ // able to use reportAbandonedObjectGraph on more platforms.
+#if USE(CF)
JSLock lock(SilenceAssertionsOnly);
JSDOMWindow::commonJSGlobalData()->heap.reportAbandonedObjectGraph();
+#else
+ if (!m_GCTimer.isActive())
+ m_GCTimer.startOneShot(0);
+#endif
}
+#if !USE(CF)
+void GCController::gcTimerFired(Timer<GCController>*)
+{
+ collect(0);
+}
+#endif
+
void GCController::garbageCollectNow()
{
JSLock lock(SilenceAssertionsOnly);
Modified: trunk/Source/WebCore/bindings/js/GCController.h (115382 => 115383)
--- trunk/Source/WebCore/bindings/js/GCController.h 2012-04-26 22:42:48 UTC (rev 115382)
+++ trunk/Source/WebCore/bindings/js/GCController.h 2012-04-26 22:53:35 UTC (rev 115383)
@@ -26,8 +26,12 @@
#ifndef GCController_h
#define GCController_h
+#if USE(CF)
#include <wtf/FastAllocBase.h>
#include <wtf/Noncopyable.h>
+#else
+#include "Timer.h"
+#endif
namespace WebCore {
@@ -45,6 +49,11 @@
private:
GCController(); // Use gcController() instead
+
+#if !USE(CF)
+ void gcTimerFired(Timer<GCController>*);
+ Timer<GCController> m_GCTimer;
+#endif
};
// Function to obtain the global GC controller.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes