diff --git a/netwerk/cookie/CookieServiceChild.cpp b/netwerk/cookie/CookieServiceChild.cpp index e324f017832b..d9c2b98220c1 100644 --- a/netwerk/cookie/CookieServiceChild.cpp +++ b/netwerk/cookie/CookieServiceChild.cpp @@ -331,6 +331,10 @@ CookieServiceChild::GetCookieStringFromDocument(Document* aDocument, nsCOMPtr principal = aDocument->EffectiveStoragePrincipal(); + if (!CookieCommons::IsSchemeSupported(principal)) { + return NS_OK; + } + nsICookie::schemeType schemeType = CookieCommons::PrincipalToSchemeType(principal);