mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1130541, r=janv.
This commit is contained in:
parent
88e7a2da63
commit
3e8ee4d5a8
@ -520,6 +520,7 @@ IDBDatabase::CreateObjectStore(
|
||||
IDBTransaction* transaction = IDBTransaction::GetCurrent();
|
||||
|
||||
if (!transaction ||
|
||||
transaction->Database() != this ||
|
||||
transaction->GetMode() != IDBTransaction::VERSION_CHANGE) {
|
||||
aRv.Throw(NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR);
|
||||
return nullptr;
|
||||
@ -595,6 +596,7 @@ IDBDatabase::DeleteObjectStore(const nsAString& aName, ErrorResult& aRv)
|
||||
IDBTransaction* transaction = IDBTransaction::GetCurrent();
|
||||
|
||||
if (!transaction ||
|
||||
transaction->Database() != this ||
|
||||
transaction->GetMode() != IDBTransaction::VERSION_CHANGE) {
|
||||
aRv.Throw(NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user