Bug 1793410 - Print changed bits in assert failure. r=jwatt

Differential Revision: https://phabricator.services.mozilla.com/D161515
This commit is contained in:
Emilio Cobos Álvarez 2022-11-07 21:09:00 +00:00
Родитель f1f2d69f1c
Коммит 1fffc2bd61
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -6,6 +6,7 @@
#include "mozilla/RestyleManager.h"
#include "mozilla/Assertions.h"
#include "mozilla/AutoRestyleTimelineMarker.h"
#include "mozilla/AutoTimelineMarker.h"
#include "mozilla/ComputedStyle.h"
@ -3270,7 +3271,13 @@ void RestyleManager::UpdateOnlyAnimationStyles() {
void RestyleManager::ElementStateChanged(Element* aElement,
ElementState aChangedBits) {
MOZ_DIAGNOSTIC_ASSERT(!mInStyleRefresh);
#ifdef EARLY_BETA_OR_EARLIER
if (MOZ_UNLIKELY(mInStyleRefresh)) {
MOZ_CRASH_UNSAFE_PRINTF(
"Element state change during style refresh (%" PRIu64 ")",
aChangedBits.GetInternalValue());
}
#endif
const ElementState kVisitedAndUnvisited =
ElementState::VISITED | ElementState::UNVISITED;