diff --git a/dom/storage/StorageUtils.cpp b/dom/storage/StorageUtils.cpp index ce0913d728e4..64a1a92a8a41 100644 --- a/dom/storage/StorageUtils.cpp +++ b/dom/storage/StorageUtils.cpp @@ -14,7 +14,9 @@ nsresult GenerateOriginKey(nsIPrincipal* aPrincipal, nsACString& aOriginAttrSuffix, nsACString& aOriginKey) { - MOZ_ASSERT(aPrincipal); + if (NS_WARN_IF(!aPrincipal)) { + return NS_ERROR_UNEXPECTED; + } aPrincipal->OriginAttributesRef().CreateSuffix(aOriginAttrSuffix);