From 635860845790a19bf50bbc51ba8fb66a96dde068 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Thu, 5 Mar 2009 14:34:32 -0800 Subject: auto import from //depot/cupcake/@136594 --- WebCore/svg/SVGElementInstance.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'WebCore/svg/SVGElementInstance.cpp') diff --git a/WebCore/svg/SVGElementInstance.cpp b/WebCore/svg/SVGElementInstance.cpp index e548900..b5fa984 100644 --- a/WebCore/svg/SVGElementInstance.cpp +++ b/WebCore/svg/SVGElementInstance.cpp @@ -31,12 +31,15 @@ #include "EventListener.h" #include "EventNames.h" #include "FrameView.h" -#include "GCController.h" #include "SVGElementInstanceList.h" #include "SVGUseElement.h" #include +#if USE(JSC) +#include "GCController.h" +#endif + namespace WebCore { #ifndef NDEBUG @@ -88,6 +91,7 @@ void SVGElementInstance::setShadowTreeElement(SVGElement* element) void SVGElementInstance::forgetWrapper() { +#if USE(JSC) // FIXME: This is fragile, as discussed with Sam. Need to find a better solution. // Think about the case where JS explicitely holds "var root = useElement.instanceRoot;". // We still have to recreate this wrapper somehow. The gc collection below, won't catch it. @@ -95,7 +99,8 @@ void SVGElementInstance::forgetWrapper() // If the use shadow tree has been rebuilt, just the JSSVGElementInstance objects // are still holding RefPtrs of SVGElementInstance objects, which prevent us to // be deleted (and the shadow tree is not destructed as well). Force JS GC. - gcController().garbageCollectNow(); + gcController().garbageCollectNow(); +#endif } void SVGElementInstance::appendChild(PassRefPtr child) @@ -164,7 +169,7 @@ bool SVGElementInstance::dispatchEvent(PassRefPtr e, ExceptionCode& ec) evt->setTarget(this); RefPtr view = element->document()->view(); - return element->dispatchGenericEvent(evt.release(), ec); + return element->dispatchGenericEvent(evt.release()); } EventListener* SVGElementInstance::onabort() const -- cgit v1.1