Commit 5bc3c54e authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[wrapper-tracing] Fix tracing across all SVG* elements

Bug: 
Change-Id: I9e206d26a2c11fbf5193170108c8f4354d32fb4e
Reviewed-on: https://chromium-review.googlesource.com/567500Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarKouhei Ueno <kouhei@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485948}
parent fdef07af
......@@ -135,7 +135,8 @@ SVGAngleTearOff* SVGAngleTearOff::CreateDetached() {
}
DEFINE_TRACE_WRAPPERS(SVGAngleTearOff) {
visitor->TraceWrappers(contextElement());
SVGPropertyTearOff<SVGAngle>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
} // namespace blink
......@@ -48,7 +48,8 @@ class SVGAnimatedBoolean final : public SVGAnimatedProperty<SVGBoolean>,
}
DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() {
visitor->TraceWrappers(contextElement());
SVGAnimatedProperty<SVGBoolean>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
protected:
......
......@@ -71,7 +71,7 @@ class SVGAnimatedEnumeration : public SVGAnimatedEnumerationBase {
}
DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() {
visitor->TraceWrappers(contextElement());
SVGAnimatedEnumerationBase::TraceWrappers(visitor);
}
protected:
......
......@@ -47,6 +47,11 @@ class SVGAnimatedEnumerationBase
void setBaseVal(unsigned short, ExceptionState&);
DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() {
SVGAnimatedProperty<SVGEnumerationBase>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
protected:
SVGAnimatedEnumerationBase(SVGElement* context_element,
const QualifiedName& attribute_name,
......
......@@ -50,7 +50,8 @@ DEFINE_TRACE(SVGAnimatedInteger) {
}
DEFINE_TRACE_WRAPPERS(SVGAnimatedInteger) {
visitor->TraceWrappers(contextElement());
SVGAnimatedProperty<SVGInteger>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
} // namespace blink
......@@ -53,7 +53,8 @@ SVGParsingError SVGAnimatedLength::SetBaseValueAsString(const String& value) {
}
DEFINE_TRACE_WRAPPERS(SVGAnimatedLength) {
visitor->TraceWrappers(contextElement());
SVGAnimatedProperty<SVGLength>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
} // namespace blink
......@@ -52,7 +52,8 @@ class SVGAnimatedLengthList final : public SVGAnimatedProperty<SVGLengthList>,
}
DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() {
visitor->TraceWrappers(contextElement());
SVGAnimatedProperty<SVGLengthList>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
protected:
......
......@@ -50,7 +50,8 @@ DEFINE_TRACE(SVGAnimatedNumber) {
}
DEFINE_TRACE_WRAPPERS(SVGAnimatedNumber) {
visitor->TraceWrappers(contextElement());
SVGAnimatedProperty<SVGNumber>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
} // namespace blink
......@@ -50,7 +50,8 @@ class SVGAnimatedNumberList final : public SVGAnimatedProperty<SVGNumberList>,
}
DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() {
visitor->TraceWrappers(contextElement());
SVGAnimatedProperty<SVGNumberList>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
protected:
......
......@@ -50,7 +50,8 @@ class SVGAnimatedPreserveAspectRatio
}
DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() {
visitor->TraceWrappers(contextElement());
SVGAnimatedProperty<SVGPreserveAspectRatio>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
protected:
......
......@@ -48,7 +48,8 @@ class SVGAnimatedRect : public SVGAnimatedProperty<SVGRect>,
}
DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() {
visitor->TraceWrappers(contextElement());
SVGAnimatedProperty<SVGRect>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
protected:
......
......@@ -20,7 +20,8 @@ String SVGAnimatedString::animVal() {
}
DEFINE_TRACE_WRAPPERS(SVGAnimatedString) {
visitor->TraceWrappers(contextElement());
SVGAnimatedProperty<SVGString>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
} // namespace blink
......@@ -54,7 +54,8 @@ class SVGAnimatedTransformList final
}
DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() {
visitor->TraceWrappers(contextElement());
SVGAnimatedProperty<SVGTransformList>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
protected:
......
......@@ -52,7 +52,9 @@ class SVGLengthListTearOff final
}
DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() {
visitor->TraceWrappers(contextElement());
SVGListPropertyTearOffHelper<SVGLengthListTearOff,
SVGLengthList>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
private:
......
......@@ -250,7 +250,8 @@ SVGLengthTearOff* SVGLengthTearOff::CreateDetached() {
}
DEFINE_TRACE_WRAPPERS(SVGLengthTearOff) {
visitor->TraceWrappers(contextElement());
SVGPropertyTearOff<SVGLength>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
} // namespace blink
......@@ -52,7 +52,9 @@ class SVGNumberListTearOff final
}
DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() {
visitor->TraceWrappers(contextElement());
SVGListPropertyTearOffHelper<SVGNumberListTearOff,
SVGNumberList>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
private:
......
......@@ -58,7 +58,8 @@ SVGNumberTearOff* SVGNumberTearOff::CreateDetached() {
}
DEFINE_TRACE_WRAPPERS(SVGNumberTearOff) {
visitor->TraceWrappers(contextElement());
SVGPropertyTearOff<SVGNumber>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
} // namespace blink
......@@ -51,7 +51,9 @@ class SVGPointListTearOff final
}
DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() {
visitor->TraceWrappers(contextElement());
SVGListPropertyTearOffHelper<SVGPointListTearOff,
SVGPointList>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
private:
......
......@@ -73,7 +73,8 @@ SVGPointTearOff* SVGPointTearOff::CreateDetached(const FloatPoint& point) {
}
DEFINE_TRACE_WRAPPERS(SVGPointTearOff) {
visitor->TraceWrappers(contextElement());
SVGPropertyTearOff<SVGPoint>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
} // namespace blink
......@@ -82,7 +82,8 @@ SVGPreserveAspectRatioTearOff::SVGPreserveAspectRatioTearOff(
attribute_name) {}
DEFINE_TRACE_WRAPPERS(SVGPreserveAspectRatioTearOff) {
visitor->TraceWrappers(contextElement());
SVGPropertyTearOff<SVGPreserveAspectRatio>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
} // namespace blink
......@@ -85,7 +85,8 @@ SVGRectTearOff* SVGRectTearOff::CreateDetached(const FloatRect& rect) {
}
DEFINE_TRACE_WRAPPERS(SVGRectTearOff) {
visitor->TraceWrappers(contextElement());
SVGPropertyTearOff<SVGRect>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
} // namespace blink
......@@ -45,6 +45,7 @@ SVGStringListTearOff::SVGStringListTearOff(
attribute_name) {}
DEFINE_TRACE_WRAPPERS(SVGStringListTearOff) {
visitor->TraceWrappers(contextElement());
SVGPropertyTearOff<SVGStringList>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
}
......@@ -62,7 +62,9 @@ SVGTransformTearOff* SVGTransformListTearOff::consolidate(
}
DEFINE_TRACE_WRAPPERS(SVGTransformListTearOff) {
visitor->TraceWrappers(contextElement());
SVGListPropertyTearOffHelper<SVGTransformListTearOff,
SVGTransformList>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
} // namespace blink
......@@ -52,6 +52,11 @@ DEFINE_TRACE(SVGTransformTearOff) {
SVGPropertyTearOff<SVGTransform>::Trace(visitor);
}
DEFINE_TRACE_WRAPPERS(SVGTransformTearOff) {
SVGPropertyTearOff<SVGTransform>::TraceWrappers(visitor);
ScriptWrappable::TraceWrappers(visitor);
}
SVGTransformTearOff* SVGTransformTearOff::CreateDetached() {
return Create(SVGTransform::Create(blink::kSvgTransformMatrix), nullptr,
kPropertyIsNotAnimVal, QualifiedName::Null());
......@@ -130,8 +135,4 @@ void SVGTransformTearOff::setSkewY(float y, ExceptionState& exception_state) {
CommitChange();
}
DEFINE_TRACE_WRAPPERS(SVGTransformTearOff) {
visitor->TraceWrappers(contextElement());
}
} // namespace blink
......@@ -81,6 +81,10 @@ class SVGAnimatedPropertyBase
DEFINE_INLINE_VIRTUAL_TRACE() {}
DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() {
visitor->TraceWrappersWithManualWriteBarrier(context_element_.Get());
}
protected:
SVGAnimatedPropertyBase(AnimatedPropertyType,
SVGElement*,
......
......@@ -182,6 +182,10 @@ class SVGListPropertyTearOffHelper : public SVGPropertyTearOff<ListProperty> {
return CreateItemTearOff(value);
}
DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() {
SVGPropertyTearOff<ListProperty>::TraceWrappers(visitor);
}
protected:
SVGListPropertyTearOffHelper(
ListPropertyType* target,
......
......@@ -66,11 +66,18 @@ class SVGPropertyTearOffBase
DCHECK(context_element);
DCHECK(attribute_name != QualifiedName::Null());
context_element_ = context_element;
// Requires SVGPropertyTearOffBase to be the left-most class in the
// inheritance hierarchy.
ScriptWrappableVisitor::WriteBarrier(this, context_element_.Get());
attribute_name_ = attribute_name;
}
DEFINE_INLINE_VIRTUAL_TRACE() {}
DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() {
visitor->TraceWrappersWithManualWriteBarrier(context_element_.Get());
}
static void ThrowReadOnly(ExceptionState&);
protected:
......@@ -108,6 +115,10 @@ class SVGPropertyTearOff : public SVGPropertyTearOffBase {
SVGPropertyTearOffBase::Trace(visitor);
}
DEFINE_INLINE_VIRTUAL_TRACE_WRAPPERS() {
SVGPropertyTearOffBase::TraceWrappers(visitor);
}
protected:
SVGPropertyTearOff(Property* target,
SVGElement* context_element,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment