From 15aff51ed922a54b02f638e6847f2fa040f7dd2c Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 19 Jul 2019 16:25:01 +0200 Subject: Get RefPtr for IDBOpenDBRequest before using it. (DiD) --- dom/indexedDB/ActorsChild.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'dom/indexedDB') diff --git a/dom/indexedDB/ActorsChild.cpp b/dom/indexedDB/ActorsChild.cpp index c4fcceb90..30dc9b6da 100644 --- a/dom/indexedDB/ActorsChild.cpp +++ b/dom/indexedDB/ActorsChild.cpp @@ -2385,9 +2385,14 @@ BackgroundVersionChangeTransactionChild::RecvComplete(const nsresult& aResult) database->Close(); } + RefPtr request = mOpenDBRequest; + MOZ_ASSERT(request); + mTransaction->FireCompleteOrAbortEvents(aResult); - mOpenDBRequest->SetTransaction(nullptr); + request->SetTransaction(nullptr); + request = nullptr; + mOpenDBRequest = nullptr; NoteComplete(); -- cgit v1.2.3