Bug 853554 - Make a number of SVG*List arrays fallible; r=longsonr

--HG--
extra : rebase_source : 892cbd389c7c3e1286d3df2dc41ba35b7d683c1d
This commit is contained in:
Ehsan Akhgari 2013-03-21 20:00:01 -04:00
parent 331ad2a22c
commit 86c451ba47
8 changed files with 16 additions and 16 deletions

View File

@ -160,7 +160,7 @@ protected:
* It may be worth considering using nsAttrValue for length lists instead of
* storing them directly on the element.
*/
nsTArray<SVGLength> mLengths;
FallibleTArray<SVGLength> mLengths;
};

View File

@ -130,10 +130,10 @@ private:
protected:
/* See SVGLengthList for the rationale for using nsTArray<float> instead
* of nsTArray<float, 1>.
/* See SVGLengthList for the rationale for using FallibleTArray<float> instead
* of FallibleTArray<float, 1>.
*/
nsTArray<float> mNumbers;
FallibleTArray<float> mNumbers;
};

View File

@ -205,7 +205,7 @@ protected:
iterator begin() { return mData.Elements(); }
iterator end() { return mData.Elements() + mData.Length(); }
nsTArray<float> mData;
FallibleTArray<float> mData;
};

View File

@ -138,10 +138,10 @@ private:
protected:
/* See SVGLengthList for the rationale for using nsTArray<SVGPoint> instead
* of nsTArray<SVGPoint, 1>.
/* See SVGLengthList for the rationale for using FallibleTArray<SVGPoint> instead
* of FallibleTArray<SVGPoint, 1>.
*/
nsTArray<SVGPoint> mItems;
FallibleTArray<SVGPoint> mItems;
};

View File

@ -133,10 +133,10 @@ private:
protected:
/* See SVGLengthList for the rationale for using nsTArray<float> instead
* of nsTArray<float, 1>.
/* See SVGLengthList for the rationale for using FallibleTArray<float> instead
* of FallibleTArray<float, 1>.
*/
nsTArray<nsString> mStrings;
FallibleTArray<nsString> mStrings;
bool mIsSet;
bool mIsCommaSeparated;
};

View File

@ -130,10 +130,10 @@ private:
protected:
/*
* See SVGLengthList for the rationale for using nsTArray<SVGTransform>
* instead of nsTArray<SVGTransform, 1>.
* See SVGLengthList for the rationale for using FallibleTArray<SVGTransform>
* instead of FallibleTArray<SVGTransform, 1>.
*/
nsTArray<SVGTransform> mItems;
FallibleTArray<SVGTransform> mItems;
};
} // namespace mozilla

View File

@ -351,7 +351,7 @@ SVGTransformListSMILType::AppendTransforms(const SVGTransformList& aList,
// static
bool
SVGTransformListSMILType::GetTransforms(const nsSMILValue& aValue,
nsTArray<SVGTransform>& aTransforms)
FallibleTArray<SVGTransform>& aTransforms)
{
NS_PRECONDITION(aValue.mType == &sSingleton, "Unexpected SMIL value type");

View File

@ -111,7 +111,7 @@ public:
static bool AppendTransforms(const SVGTransformList& aList,
nsSMILValue& aValue);
static bool GetTransforms(const nsSMILValue& aValue,
nsTArray<SVGTransform>& aTransforms);
FallibleTArray<SVGTransform>& aTransforms);
private: