зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1522744 - Use DebugOnly where we can and remove a couple of useless ifdef DEBUG statements around MOZ_ASSERT statements. r=birtles
This commit is contained in:
Родитель
1fdb590a11
Коммит
3149e5e493
|
@ -7,6 +7,7 @@
|
|||
#include "SMILAnimationFunction.h"
|
||||
|
||||
#include "mozilla/dom/SVGAnimationElement.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/Move.h"
|
||||
#include "mozilla/SMILAttr.h"
|
||||
#include "mozilla/SMILCSSValueType.h"
|
||||
|
@ -523,9 +524,7 @@ nsresult SMILAnimationFunction::ComputePacedPosition(
|
|||
|
||||
double curIntervalDist;
|
||||
|
||||
#ifdef DEBUG
|
||||
nsresult rv =
|
||||
#endif
|
||||
DebugOnly<nsresult> rv =
|
||||
aValues[i].ComputeDistance(aValues[i + 1], curIntervalDist);
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv),
|
||||
"If we got through ComputePacedTotalDistance, we should "
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
#include "SMILInterval.h"
|
||||
|
||||
#include "mozilla/DebugOnly.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
SMILInterval::SMILInterval() : mBeginFixed(false), mEndFixed(false) {}
|
||||
|
@ -111,10 +113,7 @@ void SMILInterval::AddDependentTime(SMILInstanceTime& aTime) {
|
|||
}
|
||||
|
||||
void SMILInterval::RemoveDependentTime(const SMILInstanceTime& aTime) {
|
||||
#ifdef DEBUG
|
||||
bool found =
|
||||
#endif
|
||||
mDependentTimes.RemoveElementSorted(&aTime);
|
||||
DebugOnly<bool> found = mDependentTimes.RemoveElementSorted(&aTime);
|
||||
MOZ_ASSERT(found, "Couldn't find instance time to delete.");
|
||||
}
|
||||
|
||||
|
|
|
@ -526,10 +526,8 @@ SVGElement::EnumAttributesInfo SVGSVGElement::GetEnumInfo() {
|
|||
|
||||
void SVGSVGElement::SetImageOverridePreserveAspectRatio(
|
||||
const SVGPreserveAspectRatio& aPAR) {
|
||||
#ifdef DEBUG
|
||||
MOZ_ASSERT(OwnerDoc()->IsBeingUsedAsImage(),
|
||||
"should only override preserveAspectRatio in images");
|
||||
#endif
|
||||
|
||||
bool hasViewBoxRect = HasViewBoxRect();
|
||||
if (!hasViewBoxRect && ShouldSynthesizeViewBox()) {
|
||||
|
@ -549,10 +547,8 @@ void SVGSVGElement::SetImageOverridePreserveAspectRatio(
|
|||
}
|
||||
|
||||
void SVGSVGElement::ClearImageOverridePreserveAspectRatio() {
|
||||
#ifdef DEBUG
|
||||
MOZ_ASSERT(OwnerDoc()->IsBeingUsedAsImage(),
|
||||
"should only override image preserveAspectRatio in images");
|
||||
#endif
|
||||
|
||||
if (!HasViewBoxRect() && ShouldSynthesizeViewBox()) {
|
||||
// My non-<svg:image> clients will want to paint me with a synthesized
|
||||
|
|
Загрузка…
Ссылка в новой задаче