Bug 756648 - Implement "cookie jars" for apps. r=biesi,smaug

This commit is contained in:
Jason Duell
2012-09-18 12:04:04 -04:00
parent b40842ee59
commit 8b5e83d050
15 changed files with 522 additions and 120 deletions

View File

@@ -18,6 +18,11 @@ SerializedLoadContext::SerializedLoadContext(nsILoadContext* aLoadContext)
SerializedLoadContext::SerializedLoadContext(nsIChannel* aChannel)
{
if (!aChannel) {
Init(nullptr);
return;
}
nsCOMPtr<nsILoadContext> loadContext;
NS_QueryNotificationCallbacks(aChannel, loadContext);
Init(loadContext);
@@ -40,7 +45,9 @@ SerializedLoadContext::SerializedLoadContext(nsIChannel* aChannel)
SerializedLoadContext::SerializedLoadContext(nsIWebSocketChannel* aChannel)
{
nsCOMPtr<nsILoadContext> loadContext;
NS_QueryNotificationCallbacks(aChannel, loadContext);
if (aChannel) {
NS_QueryNotificationCallbacks(aChannel, loadContext);
}
Init(loadContext);
}