summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGElementInstance.cpp
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
commit635860845790a19bf50bbc51ba8fb66a96dde068 (patch)
treeef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/svg/SVGElementInstance.cpp
parent8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff)
downloadexternal_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2
auto import from //depot/cupcake/@136594
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