OK, mjudge and I have both looked, and we think no callers remain that |QueryInterface| to get an enumerator. Everyone has been fixed to call |GetEnumerator| ... but just in case, we added an assert to find any stragglers. If this assert fires, mjudge or I need to know. bug=16543; r=mjudge
git-svn-id: svn://10.0.0.236/trunk@58198 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
dd29a022b8
commit
4c8d86d5b5
@ -1930,22 +1930,16 @@ nsDOMSelection::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(nsIEnumerator::GetIID())) {
|
||||
nsRangeListIterator *iter = new nsRangeListIterator(this);
|
||||
if (!iter)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
*aInstancePtr = NS_STATIC_CAST(nsIEnumerator*, iter);
|
||||
NS_ADDREF(iter);
|
||||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(nsIBidirectionalEnumerator::GetIID())) {
|
||||
nsRangeListIterator *iter = new nsRangeListIterator(this);
|
||||
if (!iter)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
*aInstancePtr = NS_STATIC_CAST(nsIBidirectionalEnumerator*, iter);
|
||||
NS_ADDREF(iter);
|
||||
return NS_OK;
|
||||
|
||||
|
||||
/* The following clause needs to go away, as soon as we've caught any offending callers */
|
||||
if (aIID.Equals(nsIEnumerator::GetIID())
|
||||
|| aIID.Equals(nsIBidirectionalEnumerator::GetIID())) {
|
||||
NS_ASSERTION(0, "(tell scc or mjudge) -- Error: Get new enumerators with |GetEnumerator|, not |QueryInterface|! Caller must be fixed");
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
||||
if (aIID.Equals(nsIScriptObjectOwner::GetIID())) {
|
||||
nsIScriptObjectOwner* tmp = this;
|
||||
*aInstancePtr = (void*) tmp;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user