tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit b2ed6ac947d48e37479b5cc16a9af372e4f8b953
parent b4c1813c982931c5ec52b2bb80f52872dbe90ca2
Author: serge-sans-paille <sguelton@mozilla.com>
Date:   Thu,  6 Nov 2025 13:27:51 +0000

Bug 1998398 - Make global variables of type AutoWeakFrame MOZ_CONSTINIT instead of MOZ_RUNINIT r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D271389

Diffstat:
Mdom/events/EventStateManager.cpp | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dom/events/EventStateManager.cpp b/dom/events/EventStateManager.cpp @@ -152,7 +152,7 @@ static nsITimer* gUserInteractionTimer = nullptr; static nsITimerCallback* gUserInteractionTimerCallback = nullptr; static const double kCursorLoadingTimeout = 1000; // ms -MOZ_RUNINIT static AutoWeakFrame gLastCursorSourceFrame; +MOZ_CONSTINIT static AutoWeakFrame gLastCursorSourceFrame; static TimeStamp gLastCursorUpdateTime; static TimeStamp gTypingStartTime; static TimeStamp gTypingEndTime; @@ -616,7 +616,7 @@ bool EventStateManager::sNormalLMouseEventInProcess = false; int16_t EventStateManager::sCurrentMouseBtn = MouseButton::eNotPressed; EventStateManager* EventStateManager::sActiveESM = nullptr; EventStateManager* EventStateManager::sCursorSettingManager = nullptr; -MOZ_RUNINIT AutoWeakFrame EventStateManager::sLastDragOverFrame = nullptr; +MOZ_CONSTINIT AutoWeakFrame EventStateManager::sLastDragOverFrame{}; LayoutDeviceIntPoint EventStateManager::sPreLockScreenPoint = LayoutDeviceIntPoint(0, 0); LayoutDeviceIntPoint EventStateManager::sLastRefPoint = kInvalidRefPoint;