mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
Bug 1599614 - nsAttrValue::Init is not fallible. r=mccr8,bzbarsky
Depends on D54826 Differential Revision: https://phabricator.services.mozilla.com/D54827 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
3ee8ea8b52
commit
f6b443906e
@ -171,10 +171,9 @@ nsAttrValue::nsAttrValue(const nsIntMargin& aValue) : mBits(0) {
|
||||
nsAttrValue::~nsAttrValue() { ResetIfSet(); }
|
||||
|
||||
/* static */
|
||||
nsresult nsAttrValue::Init() {
|
||||
NS_ASSERTION(!sEnumTableArray, "nsAttrValue already initialized");
|
||||
void nsAttrValue::Init() {
|
||||
MOZ_ASSERT(!sEnumTableArray, "nsAttrValue already initialized");
|
||||
sEnumTableArray = new nsTArray<const EnumTable*>;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
@ -133,7 +133,7 @@ class nsAttrValue {
|
||||
|
||||
inline const nsAttrValue& operator=(const nsAttrValue& aOther);
|
||||
|
||||
static nsresult Init();
|
||||
static void Init();
|
||||
static void Shutdown();
|
||||
|
||||
inline ValueType Type() const;
|
||||
|
@ -172,11 +172,7 @@ nsresult nsLayoutStatics::Initialize() {
|
||||
return rv;
|
||||
}
|
||||
|
||||
rv = nsAttrValue::Init();
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_ERROR("Could not initialize nsAttrValue");
|
||||
return rv;
|
||||
}
|
||||
nsAttrValue::Init();
|
||||
|
||||
rv = nsTextFragment::Init();
|
||||
if (NS_FAILED(rv)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user