Fixing bug 118933. Speeding up the id and name hash tables in nsHTMLDocument by changing them over from nsHashtable/nsStirngKey to pldhash. Also combining the hashes to optimize performance and memory useage. r=heikki@netscape.com, sr=jband@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@112844 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -224,9 +224,20 @@ NS_EXPORT nsresult
|
||||
NS_NewImageDocument(nsIDocument** aInstancePtrResult)
|
||||
{
|
||||
nsImageDocument* doc = new nsImageDocument();
|
||||
if(doc)
|
||||
return doc->QueryInterface(NS_GET_IID(nsIDocument), (void**) aInstancePtrResult);
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ENSURE_TRUE(doc, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
nsresult rv = doc->Init();
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
delete doc;
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
*aInstancePtrResult = doc;
|
||||
NS_ADDREF(*aInstancePtrResult);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsImageDocument::nsImageDocument()
|
||||
|
||||
Reference in New Issue
Block a user