From c75d50addea4f134130f2f2d822aec7f56f4cbd3 Mon Sep 17 00:00:00 2001 From: roytam1 Date: Sat, 13 Jan 2024 21:03:58 +0800 Subject: [PATCH] workaround of microtask cleanup to prevent a crash --- xpcom/base/CycleCollectedJSContext.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xpcom/base/CycleCollectedJSContext.cpp b/xpcom/base/CycleCollectedJSContext.cpp index d92283fb20..dc41421901 100644 --- a/xpcom/base/CycleCollectedJSContext.cpp +++ b/xpcom/base/CycleCollectedJSContext.cpp @@ -1477,7 +1477,9 @@ CycleCollectedJSContext::AfterProcessMicrotasks() } // Cleanup Indexed Database transactions: // https://html.spec.whatwg.org/multipage/webappapis.html#perform-a-microtask-checkpoint - CleanupIDBTransactions(RecursionDepth()); + if(!mPendingIDBTransactions.IsEmpty()) { + CleanupIDBTransactions(RecursionDepth()); + } } uint32_t