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-14 08:27:43 -05:00
parent 022c161e17
commit ec11c24ab0

View File

@ -2677,6 +2677,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;