Bug 1293212 - Add MOZ_MUST_USE to prevent potential bugs. r=smaug

MozReview-Commit-ID: EuyeBkDlk2G
This commit is contained in:
Wei-Cheng Pan
2016-08-08 18:16:15 +08:00
parent 156c792bf3
commit 69063dae17
14 changed files with 42 additions and 37 deletions

View File

@@ -3316,7 +3316,8 @@ nsDocShell::SetDocLoaderParent(nsDocLoader* aParent)
{
bool wasFrame = IsFrame();
nsDocLoader::SetDocLoaderParent(aParent);
nsresult rv = nsDocLoader::SetDocLoaderParent(aParent);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsISupportsPriority> priorityGroup = do_QueryInterface(mLoadGroup);
if (wasFrame != IsFrame() && priorityGroup) {
@@ -4036,7 +4037,8 @@ nsDocShell::AddChild(nsIDocShellTreeItem* aChild)
// Make sure to remove the child from its current parent.
nsDocLoader* childsParent = childAsDocLoader->GetParent();
if (childsParent) {
childsParent->RemoveChildLoader(childAsDocLoader);
nsresult rv = childsParent->RemoveChildLoader(childAsDocLoader);
NS_ENSURE_SUCCESS(rv, rv);
}
// Make sure to clear the treeowner in case this child is a different type