Bug 1074111 - TransactionBase::VerifyRequestParams should check transaction mode for delete and clear request; r=bent

This commit is contained in:
Jan Varga 2014-09-30 15:05:48 +02:00
Родитель c27c3931ff
Коммит f443b192ef
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -6814,6 +6814,12 @@ TransactionBase::VerifyRequestParams(const RequestParams& aParams) const
}
case RequestParams::TObjectStoreDeleteParams: {
if (NS_WARN_IF(mMode != IDBTransaction::READ_WRITE &&
mMode != IDBTransaction::VERSION_CHANGE)) {
ASSERT_UNLESS_FUZZING();
return false;
}
const ObjectStoreDeleteParams& params =
aParams.get_ObjectStoreDeleteParams();
const nsRefPtr<FullObjectStoreMetadata> objectStoreMetadata =
@ -6830,6 +6836,12 @@ TransactionBase::VerifyRequestParams(const RequestParams& aParams) const
}
case RequestParams::TObjectStoreClearParams: {
if (NS_WARN_IF(mMode != IDBTransaction::READ_WRITE &&
mMode != IDBTransaction::VERSION_CHANGE)) {
ASSERT_UNLESS_FUZZING();
return false;
}
const ObjectStoreClearParams& params =
aParams.get_ObjectStoreClearParams();
const nsRefPtr<FullObjectStoreMetadata> objectStoreMetadata =