Bug 1387381 - Remove nsXPIDLString local variables. r=erahm.

nsXPIDLStrings are marked as VOIDED upon initialization. Most of these local
nsXPIDLString variables are immediately set via getter_Copies(), which will
either assign a string value (using Adopt()) or do SetIsVoid(). These can be
trivially converted to nsString, which will get the same treatment.

The patch suitably converts the remaining nsXPIDLString local variable as well.
This commit is contained in:
Nicholas Nethercote
2017-08-08 16:07:55 +10:00
parent 84a1d0d32f
commit d24ecfe191
32 changed files with 71 additions and 83 deletions

View File

@@ -1305,7 +1305,7 @@ nsDocShell::LoadURI(nsIURI* aURI,
uint32_t referrerPolicy = mozilla::net::RP_Unset;
bool isSrcdoc = false;
nsCOMPtr<nsISHEntry> shEntry;
nsXPIDLString target;
nsString target;
nsAutoString srcdoc;
nsCOMPtr<nsIDocShell> sourceDocShell;
nsCOMPtr<nsIURI> baseURI;
@@ -4288,7 +4288,6 @@ nsDocShell::FindChildWithName(const nsAString& aName,
return NS_OK;
}
nsXPIDLString childName;
nsTObserverArray<nsDocLoader*>::ForwardIterator iter(mChildList);
while (iter.HasMore()) {
nsCOMPtr<nsIDocShellTreeItem> child = do_QueryObject(iter.GetNext());