Bug 734847 part 2 - treewide changes resulting from the default-infallibility of hashtables; either remove useless result checks, or use the fallible version of APIs, depending on context, r=jlebar
This commit is contained in:
@@ -877,8 +877,7 @@ nsDocShell::Init()
|
||||
rv = mContentListener->Init();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (!mStorages.Init())
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
mStorages.Init();
|
||||
|
||||
// We want to hold a strong ref to the loadgroup, so it better hold a weak
|
||||
// ref to us... use an InterfaceRequestorProxy to do this.
|
||||
@@ -2442,8 +2441,7 @@ nsDocShell::GetSessionStorageForPrincipal(nsIPrincipal* aPrincipal,
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
if (!mStorages.Put(origin, newstorage))
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
mStorages.Put(origin, newstorage);
|
||||
|
||||
newstorage.swap(*aStorage);
|
||||
#if defined(PR_LOGGING) && defined(DEBUG)
|
||||
@@ -2580,8 +2578,7 @@ nsDocShell::AddSessionStorage(nsIPrincipal* aPrincipal,
|
||||
("nsDocShell[%p]: was added a sessionStorage %p",
|
||||
this, aStorage));
|
||||
#endif
|
||||
if (!mStorages.Put(origin, aStorage))
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
mStorages.Put(origin, aStorage);
|
||||
}
|
||||
else {
|
||||
return topDocShell->AddSessionStorage(aPrincipal, aStorage);
|
||||
|
||||
Reference in New Issue
Block a user