mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 779638: Delay dropping the transaction until later to avoid races. r=bent
This commit is contained in:
parent
5b1d66a0b0
commit
a2dd03ca6e
@ -42,6 +42,20 @@ public:
|
||||
virtual nsresult
|
||||
GetSuccessResult(JSContext* aCx, jsval* aVal) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult
|
||||
OnSuccess() MOZ_OVERRIDE
|
||||
{
|
||||
static_cast<IDBOpenDBRequest*>(mRequest.get())->SetTransaction(NULL);
|
||||
return AsyncConnectionHelper::OnSuccess();
|
||||
}
|
||||
|
||||
virtual void
|
||||
OnError() MOZ_OVERRIDE
|
||||
{
|
||||
static_cast<IDBOpenDBRequest*>(mRequest.get())->SetTransaction(NULL);
|
||||
AsyncConnectionHelper::OnError();
|
||||
}
|
||||
|
||||
virtual nsresult
|
||||
DoDatabaseWork(mozIStorageConnection* aConnection) MOZ_OVERRIDE;
|
||||
};
|
||||
@ -339,8 +353,6 @@ IndexedDBDatabaseChild::RecvSuccess(
|
||||
openHelper = new IPCOpenDatabaseHelper(mDatabase, request);
|
||||
}
|
||||
|
||||
request->SetTransaction(NULL);
|
||||
|
||||
MainThreadEventTarget target;
|
||||
if (NS_FAILED(openHelper->Dispatch(&target))) {
|
||||
NS_WARNING("Dispatch of IPCOpenDatabaseHelper failed!");
|
||||
@ -372,7 +384,6 @@ IndexedDBDatabaseChild::RecvError(const nsresult& aRv)
|
||||
}
|
||||
|
||||
openHelper->SetError(aRv);
|
||||
request->SetTransaction(NULL);
|
||||
|
||||
MainThreadEventTarget target;
|
||||
if (NS_FAILED(openHelper->Dispatch(&target))) {
|
||||
|
Loading…
Reference in New Issue
Block a user