Bug 1322588 - Get rid of nsIDocShell::addSessionStorage, r=qdot

This commit is contained in:
Andrea Marchesini
2016-12-12 09:33:11 +01:00
parent 5326213f69
commit 212fd79bf9
2 changed files with 0 additions and 32 deletions

View File

@@ -3008,28 +3008,6 @@ nsDocShell::TopSessionStorageManager()
return mSessionStorageManager;
}
nsresult
nsDocShell::AddSessionStorage(nsIPrincipal* aPrincipal, nsIDOMStorage* aStorage)
{
RefPtr<DOMStorage> storage = static_cast<DOMStorage*>(aStorage);
if (!storage) {
return NS_ERROR_UNEXPECTED;
}
nsIPrincipal* storagePrincipal = storage->GetPrincipal();
if (storagePrincipal != aPrincipal) {
NS_ERROR("Wanting to add a sessionStorage for different principal");
return NS_ERROR_DOM_SECURITY_ERR;
}
nsCOMPtr<nsIDOMStorageManager> manager = TopSessionStorageManager();
if (!manager) {
return NS_ERROR_UNEXPECTED;
}
return manager->CloneStorage(aStorage);
}
NS_IMETHODIMP
nsDocShell::GetCurrentDocumentChannel(nsIChannel** aResult)
{