Fixing bug 408792. Remove some expensive QI calls from frequently called code. r=jonas@sicking.cc, sr=bzbarsky@mit.edu

git-svn-id: svn://10.0.0.236/trunk@241908 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%mozilla.org
2007-12-21 13:44:59 +00:00
parent 58a6adb633
commit 7ea4fcdbc4
5 changed files with 23 additions and 8 deletions

View File

@@ -3399,7 +3399,7 @@ nsHTMLDocument::ResolveName(const nsAString& aName,
IdAndNameMapEntry *entry =
static_cast<IdAndNameMapEntry *>
(PL_DHashTableOperate(&mIdAndNameHashTable, name,
PL_DHASH_ADD));
PL_DHASH_ADD));
NS_ENSURE_TRUE(entry, NS_ERROR_OUT_OF_MEMORY);
if (entry->mNameContentList == NAME_NOT_VALID) {
@@ -3419,7 +3419,7 @@ nsHTMLDocument::ResolveName(const nsAString& aName,
// If we already have an entry->mNameContentList, we need to flush out
// notifications too, so that it will get updated properly.
FlushPendingNotifications(entry->mNameContentList ?
Flush_ContentAndNotify : Flush_Content);
Flush_ContentAndNotify : Flush_Content);
if (generation != mIdAndNameHashTable.generation) {
// Table changed, so the entry pointer is no longer valid; look up the
@@ -3428,7 +3428,7 @@ nsHTMLDocument::ResolveName(const nsAString& aName,
entry =
static_cast<IdAndNameMapEntry *>
(PL_DHashTableOperate(&mIdAndNameHashTable, name,
PL_DHASH_ADD));
PL_DHASH_ADD));
NS_ENSURE_TRUE(entry, NS_ERROR_OUT_OF_MEMORY);
}