fixed fatal error in observer dictionary code

This commit is contained in:
rickg%netscape.com 1999-07-17 07:21:57 +00:00
Родитель 552ee1b1fa
Коммит f4e0030acb
2 изменённых файлов: 16 добавлений и 12 удалений

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

@ -642,13 +642,15 @@ PRUint32 AccumulateCRC(PRUint32 crc_accum, char *data_blk_ptr, int data_blk_size
******************************************************************************/
CObserverDictionary::CObserverDictionary() {
static nsString theTopicList[2] = {"htmlparser","xmlparser"};
PRInt32 theIndex=0;
nsAutoString theHTMLTopic("htmlparser");
RegisterObservers(theHTMLTopic);
nsAutoString theXMLTopic("xmlparser");
RegisterObservers(theXMLTopic);
nsCRT::zero(mObservers,sizeof(mObservers));
while(theTopicList[theIndex].Length() > 0) {
RegisterObservers(theTopicList[theIndex]);
theIndex++;
}
}
CObserverDictionary::~CObserverDictionary() {

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

@ -642,13 +642,15 @@ PRUint32 AccumulateCRC(PRUint32 crc_accum, char *data_blk_ptr, int data_blk_size
******************************************************************************/
CObserverDictionary::CObserverDictionary() {
static nsString theTopicList[2] = {"htmlparser","xmlparser"};
PRInt32 theIndex=0;
nsAutoString theHTMLTopic("htmlparser");
RegisterObservers(theHTMLTopic);
nsAutoString theXMLTopic("xmlparser");
RegisterObservers(theXMLTopic);
nsCRT::zero(mObservers,sizeof(mObservers));
while(theTopicList[theIndex].Length() > 0) {
RegisterObservers(theTopicList[theIndex]);
theIndex++;
}
}
CObserverDictionary::~CObserverDictionary() {