Bug 1242924 - check return of pattern.Init in DOMStorageManager::Observe. r=jst

--HG--
extra : rebase_source : 4407baa0e09ff6dab73db354cf38e41130b2f559
This commit is contained in:
Bogdan Postelnicu 2016-01-26 15:09:19 +02:00
parent b4c228baec
commit 2a8999dca1

View File

@ -516,7 +516,10 @@ DOMStorageManager::Observe(const char* aTopic,
const nsACString& aOriginScope)
{
OriginAttributesPattern pattern;
pattern.Init(aOriginAttributesPattern);
if (!pattern.Init(aOriginAttributesPattern)) {
NS_ERROR("Cannot parse origin attributes pattern");
return NS_ERROR_FAILURE;
}
// Clear everything, caches + database
if (!strcmp(aTopic, "cookie-cleared")) {