Bug 581341 - Part 6: Nits. r=bent

This commit is contained in:
Josh Matthews 2011-06-29 13:20:43 -04:00
parent 2d89b875c9
commit 4737501d88
2 changed files with 6 additions and 7 deletions

View File

@ -330,8 +330,9 @@ ContentParent::DestroyTestShell(TestShellParent* aTestShell)
TestShellParent*
ContentParent::GetTestShellSingleton()
{
if (!ManagedPTestShellParent().Length())
if (ManagedPTestShellParent().IsEmpty()) {
return nsnull;
}
return static_cast<TestShellParent*>(ManagedPTestShellParent()[0]);
}

View File

@ -712,11 +712,11 @@ TestShellParent* GetOrCreateTestShellParent()
if (!parent) {
return nsnull;
}
TestShellParent* testShell = parent->GetTestShellSingleton();
if (testShell) {
return testShell;
}
if (!testShell) {
testShell = parent->CreateTestShell();
}
return testShell;
}
}
@ -758,9 +758,7 @@ XRE_ShutdownTestShell()
{
ContentParent* cp = ContentParent::GetSingleton(PR_FALSE);
TestShellParent* tsp = cp ? cp->GetTestShellSingleton() : nsnull;
if (!tsp)
return true;
return cp->DestroyTestShell(tsp);
return tsp ? cp->DestroyTestShell(tsp) : true;
}
#ifdef MOZ_X11