** Patch provided by dougt ** Create parser-service category.b=107087, r=harishd, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@114537 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -22,10 +22,12 @@
|
||||
#include "nsParserService.h"
|
||||
#include "nsHTMLEntities.h"
|
||||
#include "nsElementTable.h"
|
||||
#include "nsICategoryManager.h"
|
||||
|
||||
nsParserService::nsParserService() : mEntries(0)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mHaveNotifiedCategoryObservers = PR_FALSE;
|
||||
}
|
||||
|
||||
nsParserService::~nsParserService()
|
||||
@@ -185,6 +187,14 @@ nsParserService::GetTopicObservers(const nsAString& aTopic,
|
||||
nsObserverEntry*
|
||||
nsParserService::GetEntry(const nsAString& aTopic)
|
||||
{
|
||||
if(!mHaveNotifiedCategoryObservers) {
|
||||
mHaveNotifiedCategoryObservers = PR_TRUE;
|
||||
NS_CreateServicesFromCategory("parser-service-category",
|
||||
NS_STATIC_CAST(nsISupports*,NS_STATIC_CAST(void*,this)),
|
||||
"parser-service-start");
|
||||
}
|
||||
|
||||
|
||||
PRInt32 index = 0;
|
||||
nsObserverEntry* entry = nsnull;
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ protected:
|
||||
nsObserverEntry** aEntry);
|
||||
|
||||
nsDeque mEntries; //each topic holds a list of observers per tag.
|
||||
PRBool mHaveNotifiedCategoryObservers;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user