Issue #2452 - Ensure DOM events aren't dispatched at unexpected time

https://bugzilla.mozilla.org/show_bug.cgi?id=1409985
https://bugzilla.mozilla.org/show_bug.cgi?id=1443746
This commit is contained in:
Martok 2024-01-14 21:51:47 +01:00 committed by roytam1
commit d6dd1f8133
5 changed files with 53 additions and 6 deletions

View file

@ -5444,6 +5444,14 @@ nsContentUtils::AddPendingIDBTransaction(already_AddRefed<nsIRunnable> aTransact
CycleCollectedJSContext::Get()->AddPendingIDBTransaction(Move(aTransaction));
}
/* static */
bool
nsContentUtils::IsInStableOrMetaStableState()
{
MOZ_ASSERT(CycleCollectedJSContext::Get(), "Must be on a script thread!");
return CycleCollectedJSContext::Get()->IsInStableOrMetaStableState();
}
/*
* Helper function for nsContentUtils::ProcessViewportInfo.
*