mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Fix manky nsCOMPtr asserts.
This commit is contained in:
parent
0cfe671193
commit
22be6e4c41
@ -4154,8 +4154,9 @@ nsXULDocument::PrepareToWalk()
|
||||
PRUint32 count;
|
||||
overlays->Count(&count);
|
||||
for (PRInt32 i = count - 1; i >= 0; --i) {
|
||||
nsCOMPtr<nsISupports> isupports = dont_AddRef(overlays->ElementAt(i));
|
||||
nsISupports* isupports = overlays->ElementAt(i);
|
||||
mUnloadedOverlays->AppendElement(isupports);
|
||||
NS_IF_RELEASE(isupports);
|
||||
}
|
||||
|
||||
|
||||
@ -5007,9 +5008,10 @@ nsXULDocument::AddPrototypeSheets()
|
||||
PRUint32 count;
|
||||
sheets->Count(&count);
|
||||
for (PRUint32 i = 0; i < count; ++i) {
|
||||
nsCOMPtr<nsISupports> isupports = dont_AddRef(sheets->ElementAt(i));
|
||||
|
||||
nsISupports* isupports = sheets->ElementAt(i);
|
||||
nsCOMPtr<nsIURI> uri = do_QueryInterface(isupports);
|
||||
NS_IF_RELEASE(isupports);
|
||||
|
||||
NS_ASSERTION(uri != nsnull, "not a URI!!!");
|
||||
if (! uri)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
@ -4154,8 +4154,9 @@ nsXULDocument::PrepareToWalk()
|
||||
PRUint32 count;
|
||||
overlays->Count(&count);
|
||||
for (PRInt32 i = count - 1; i >= 0; --i) {
|
||||
nsCOMPtr<nsISupports> isupports = dont_AddRef(overlays->ElementAt(i));
|
||||
nsISupports* isupports = overlays->ElementAt(i);
|
||||
mUnloadedOverlays->AppendElement(isupports);
|
||||
NS_IF_RELEASE(isupports);
|
||||
}
|
||||
|
||||
|
||||
@ -5007,9 +5008,10 @@ nsXULDocument::AddPrototypeSheets()
|
||||
PRUint32 count;
|
||||
sheets->Count(&count);
|
||||
for (PRUint32 i = 0; i < count; ++i) {
|
||||
nsCOMPtr<nsISupports> isupports = dont_AddRef(sheets->ElementAt(i));
|
||||
|
||||
nsISupports* isupports = sheets->ElementAt(i);
|
||||
nsCOMPtr<nsIURI> uri = do_QueryInterface(isupports);
|
||||
NS_IF_RELEASE(isupports);
|
||||
|
||||
NS_ASSERTION(uri != nsnull, "not a URI!!!");
|
||||
if (! uri)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
Loading…
Reference in New Issue
Block a user