Bug 1295103 - Check OriginAttributes::PopulateFromSuffix return value in DOMStorageDBThread r=mayhemer

MozReview-Commit-ID: FSIgxWNf9s4

--HG--
extra : rebase_source : bf9f04d2ddd33782046594c9c3632a5d59a8be5c
This commit is contained in:
Kan-Ru Chen 2016-08-15 18:17:08 +08:00
parent 4a85c13154
commit 1594b39727

View File

@ -55,7 +55,8 @@ Scheme0Scope(DOMStorageCacheBridge* aCache)
PrincipalOriginAttributes oa;
if (!suffix.IsEmpty()) {
oa.PopulateFromSuffix(suffix);
DebugOnly<bool> success = oa.PopulateFromSuffix(suffix);
MOZ_ASSERT(success);
}
if (oa.mAppId != nsIScriptSecurityManager::NO_APP_ID || oa.mInIsolatedMozBrowser) {
@ -763,7 +764,8 @@ OriginAttrsPatternMatchSQLFunction::OnFunctionCall(
NS_ENSURE_SUCCESS(rv, rv);
PrincipalOriginAttributes oa;
oa.PopulateFromSuffix(suffix);
bool success = oa.PopulateFromSuffix(suffix);
NS_ENSURE_TRUE(success, NS_ERROR_FAILURE);
bool result = mPattern.Matches(oa);
RefPtr<nsVariant> outVar(new nsVariant());