Attempt to fix btek bustage by naming the union. a=tinderbox.

This commit is contained in:
shaver%mozilla.org 2002-03-04 03:37:18 +00:00
Родитель 6e497ee63a
Коммит 051b73ea64
2 изменённых файлов: 6 добавлений и 6 удалений

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

@ -2032,7 +2032,7 @@ nsDOMClassInfo::Init()
}
for (i = 0; i < eDOMClassInfoIDCount; i++) {
if (!sClassInfoData[i].mConstructorFptr ||
if (!sClassInfoData[i].u.mConstructorFptr ||
sClassInfoData[i].mDebugID != i) {
NS_ERROR("Class info data out of sync, you forgot to update "
"nsDOMClassInfo.h and nsDOMClassInfo.cpp! Fix this, "
@ -2509,7 +2509,7 @@ nsDOMClassInfo::GetClassInfoInstance(nsDOMClassInfoID aID)
if (!sClassInfoData[aID].mCachedClassInfo) {
nsDOMClassInfoData& data = sClassInfoData[aID];
data.mCachedClassInfo = data.mConstructorFptr(&data);
data.mCachedClassInfo = data.u.mConstructorFptr(&data);
NS_ENSURE_TRUE(data.mCachedClassInfo, nsnull);
NS_ADDREF(data.mCachedClassInfo);
@ -2534,8 +2534,8 @@ nsDOMClassInfo::GetClassInfoInstance(nsDOMClassInfoData* aData)
"This is bad, external class marked as internal!");
if (!aData->mCachedClassInfo) {
if (aData->mExternalConstructorFptr) {
aData->mCachedClassInfo = aData->mExternalConstructorFptr(aData->mName);
if (aData->u.mExternalConstructorFptr) {
aData->mCachedClassInfo = aData->u.mExternalConstructorFptr(aData->mName);
} else {
aData->mCachedClassInfo = nsDOMGenericSH::doCreate(aData);
}
@ -2556,7 +2556,7 @@ nsDOMClassInfo::GetClassInfoInstance(nsDOMClassInfoData* aData)
void
nsDOMClassInfo::ShutDown()
{
if (sClassInfoData[0].mConstructorFptr) {
if (sClassInfoData[0].u.mConstructorFptr) {
PRUint32 i;
for (i = 0; i < eDOMClassInfoIDCount; i++) {

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

@ -61,7 +61,7 @@ struct nsDOMClassInfoData
union {
nsDOMClassInfoConstructorFnc mConstructorFptr;
nsDOMClassInfoExternalConstructorFnc mExternalConstructorFptr;
};
} u;
nsIClassInfo *mCachedClassInfo; // low bit is set to 1 if external,
// so be sure to mask if necessary!
const nsIID *mProtoChainInterface;