mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
Issue #1693 - Use scoped enums for IDBTransaction.
Based on a patch from Mozilla bug 1598164. Needed due to identifier collision between NSS and IDBTransaction. Co-authored by: Simon Giesecke <simon.giesecke@gmail.com> Co-authored by: Matt A. Tobin <email@mattatobin.com>
This commit is contained in:
parent
89dd425fd2
commit
c920f32df3
25 changed files with 175 additions and 182 deletions
|
|
@ -1407,7 +1407,7 @@ IDBObjectStore::AddOrPut(JSContext* aCx,
|
|||
MOZ_ASSERT(aCx);
|
||||
MOZ_ASSERT_IF(aFromCursor, aOverwrite);
|
||||
|
||||
if (mTransaction->GetMode() == IDBTransaction::CLEANUP ||
|
||||
if (mTransaction->GetMode() == IDBTransaction::Mode::Cleanup ||
|
||||
mDeletedSpec) {
|
||||
aRv.Throw(NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR);
|
||||
return nullptr;
|
||||
|
|
@ -1991,7 +1991,7 @@ IDBObjectStore::CreateIndex(const nsAString& aName,
|
|||
{
|
||||
AssertIsOnOwningThread();
|
||||
|
||||
if (mTransaction->GetMode() != IDBTransaction::VERSION_CHANGE ||
|
||||
if (mTransaction->GetMode() != IDBTransaction::Mode::VersionChange ||
|
||||
mDeletedSpec) {
|
||||
aRv.Throw(NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR);
|
||||
return nullptr;
|
||||
|
|
@ -2101,7 +2101,7 @@ IDBObjectStore::DeleteIndex(const nsAString& aName, ErrorResult& aRv)
|
|||
{
|
||||
AssertIsOnOwningThread();
|
||||
|
||||
if (mTransaction->GetMode() != IDBTransaction::VERSION_CHANGE ||
|
||||
if (mTransaction->GetMode() != IDBTransaction::Mode::VersionChange ||
|
||||
mDeletedSpec) {
|
||||
aRv.Throw(NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR);
|
||||
return;
|
||||
|
|
@ -2424,7 +2424,7 @@ IDBObjectStore::SetName(const nsAString& aName, ErrorResult& aRv)
|
|||
{
|
||||
AssertIsOnOwningThread();
|
||||
|
||||
if (mTransaction->GetMode() != IDBTransaction::VERSION_CHANGE ||
|
||||
if (mTransaction->GetMode() != IDBTransaction::Mode::VersionChange ||
|
||||
mDeletedSpec) {
|
||||
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue