diff options
author | Moonchild <moonchild@palemoon.org> | 2023-09-20 00:40:04 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-09-20 00:40:04 +0000 |
commit | dba1e366014e91a04823e047dc20c8d01d259702 (patch) | |
tree | 7534050ad4710635cc872daada169acbe569b824 /dom | |
parent | f122b231e5aa9fce38ac784609292f7a5c527f99 (diff) | |
parent | dca8417ba7fdcf3db8de1c68bd92be54f3036d67 (diff) | |
download | uxp-dba1e366014e91a04823e047dc20c8d01d259702.tar.gz |
Merge pull request 'Collection of BigInt related fixes from working on Proton Mail issue' (#2310) from dbsoft/UXP:bigint-incdec into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2310
Diffstat (limited to 'dom')
-rwxr-xr-x | dom/performance/Performance.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/dom/performance/Performance.cpp b/dom/performance/Performance.cpp index e8a46409ef..daaa72486a 100755 --- a/dom/performance/Performance.cpp +++ b/dom/performance/Performance.cpp @@ -676,7 +676,8 @@ public: NS_IMETHOD Run() override { MOZ_ASSERT(mPerformance); - mPerformance->NotifyObservers(); + RefPtr<Performance> performance(mPerformance); + performance->NotifyObservers(); return NS_OK; } @@ -700,7 +701,12 @@ Performance::RunNotificationObserversTask() { mPendingNotificationObserversTask = true; nsCOMPtr<nsIRunnable> task = new NotifyObserversTask(this); - nsresult rv = NS_DispatchToCurrentThread(task); + nsresult rv; + if (NS_IsMainThread()) { + rv = NS_DispatchToCurrentThread(task); + } else { + rv = NS_DispatchToMainThread(task); + } if (NS_WARN_IF(NS_FAILED(rv))) { mPendingNotificationObserversTask = false; } |