diff --git a/content/svg/content/src/nsSVGAnimationElement.cpp b/content/svg/content/src/nsSVGAnimationElement.cpp index 91a2a231afa..9decc6829bb 100644 --- a/content/svg/content/src/nsSVGAnimationElement.cpp +++ b/content/svg/content/src/nsSVGAnimationElement.cpp @@ -71,10 +71,20 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END //---------------------------------------------------------------------- // Implementation +#ifdef _MSC_VER +// Disable "warning C4355: 'this' : used in base member initializer list". +// We can ignore that warning because we know that mHrefTarget's constructor +// doesn't dereference the pointer passed to it. +#pragma warning(push) +#pragma warning(disable:4355) +#endif nsSVGAnimationElement::nsSVGAnimationElement(nsINodeInfo *aNodeInfo) : nsSVGAnimationElementBase(aNodeInfo), mHrefTarget(this), mTimedDocumentRoot(nsnull) +#ifdef _MSC_VER +#pragma warning(pop) +#endif { } diff --git a/content/svg/content/src/nsSVGUseElement.cpp b/content/svg/content/src/nsSVGUseElement.cpp index efa80dae076..5cc673e1971 100644 --- a/content/svg/content/src/nsSVGUseElement.cpp +++ b/content/svg/content/src/nsSVGUseElement.cpp @@ -95,8 +95,18 @@ NS_INTERFACE_MAP_END_INHERITING(nsSVGUseElementBase) //---------------------------------------------------------------------- // Implementation +#ifdef _MSC_VER +// Disable "warning C4355: 'this' : used in base member initializer list". +// We can ignore that warning because we know that mSource's constructor +// doesn't dereference the pointer passed to it. +#pragma warning(push) +#pragma warning(disable:4355) +#endif nsSVGUseElement::nsSVGUseElement(nsINodeInfo *aNodeInfo) : nsSVGUseElementBase(aNodeInfo), mSource(this) +#ifdef _MSC_VER +#pragma warning(pop) +#endif { } diff --git a/layout/svg/base/src/nsSVGEffects.cpp b/layout/svg/base/src/nsSVGEffects.cpp index 16426c666a1..385b73c730a 100644 --- a/layout/svg/base/src/nsSVGEffects.cpp +++ b/layout/svg/base/src/nsSVGEffects.cpp @@ -48,12 +48,22 @@ NS_IMPL_ISUPPORTS1(nsSVGRenderingObserver, nsIMutationObserver) +#ifdef _MSC_VER +// Disable "warning C4355: 'this' : used in base member initializer list". +// We can ignore that warning because we know that mElement's constructor +// doesn't dereference the pointer passed to it. +#pragma warning(push) +#pragma warning(disable:4355) +#endif nsSVGRenderingObserver::nsSVGRenderingObserver(nsIURI *aURI, nsIFrame *aFrame) : mElement(this), mFrame(aFrame), mFramePresShell(aFrame->PresContext()->PresShell()), mReferencedFrame(nsnull), mReferencedFramePresShell(nsnull) +#ifdef _MSC_VER +#pragma warning(pop) +#endif { // Start watching the target element mElement.Reset(aFrame->GetContent(), aURI);