Bug 231104 - Checkin for Bug 195350 causes AIX build to segfault on startup.

r=bugmail@sicking.cc, sr=tor@acm.org
This commit is contained in:
pkw%us.ibm.com 2004-01-22 21:58:57 +00:00
Родитель de731a8671
Коммит e14c5e9a65
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -92,7 +92,13 @@ public:
const nsAttrValue* AttrAt(PRUint32 aPos) const
{
NS_ASSERTION(aPos < AttrCount(), "out-of-bounds access in nsAttrAndChildArray");
return &NS_REINTERPRET_CAST(InternalAttr*, mImpl->mBuffer)[aPos].mValue;
/**
* Due to a compiler bug in VisualAge C++ for AIX, we need to return
* the address of the first index into mBuffer here. A similar fix
* was also made to the ATTRS macro in nsAttrAndChildArray.cpp. See
* Bug 231104.
*/
return &NS_REINTERPRET_CAST(InternalAttr*, &(mImpl->mBuffer[0]))[aPos].mValue;
}
nsresult SetAttr(nsIAtom* aLocalName, const nsAString& aValue);
nsresult SetAttr(nsIAtom* aLocalName, nsHTMLValue* aValue);