summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGElementInstance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/svg/SVGElementInstance.cpp')
-rw-r--r--WebCore/svg/SVGElementInstance.cpp11
1 files changed, 8 insertions, 3 deletions
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 <wtf/RefCountedLeakCounter.h>
+#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<SVGElementInstance> child)
@@ -164,7 +169,7 @@ bool SVGElementInstance::dispatchEvent(PassRefPtr<Event> e, ExceptionCode& ec)
evt->setTarget(this);
RefPtr<FrameView> view = element->document()->view();
- return element->dispatchGenericEvent(evt.release(), ec);
+ return element->dispatchGenericEvent(evt.release());
}
EventListener* SVGElementInstance::onabort() const