Bug 1214305 - Part 0: Ensure site security service is initialized before trying to use DataStorage via IPC.

This commit is contained in:
Josh Matthews 2015-11-16 13:51:10 -05:00 committed by Ehsan Akhgari
parent e89c66f355
commit 21aeea2c72

View File

@ -2761,6 +2761,9 @@ bool
ContentParent::RecvReadDataStorageArray(const nsString& aFilename,
InfallibleTArray<DataStorageItem>* aValues)
{
// Ensure the SSS is initialized before we try to use its storage.
nsCOMPtr<nsISiteSecurityService> sss = do_GetService("@mozilla.org/ssservice;1");
RefPtr<DataStorage> storage = DataStorage::Get(aFilename);
storage->GetAll(aValues);
return true;