Bug: Sync style/layout(?) reflows when closing tabs
Status: RESOLVED
Priority: P3
Resolution: FIXED
Created: 2023-03-15 11:49:14+00:00
Resolved: 2023-03-31 03:51:27+00:00

I see at least two things here:

Inside `removeTab`, which calls `getComputedStyle` and looks like it needs it to flush to know if we've started animating something: https://searchfox.org/mozilla-central/rev/47aea2f603cc18144afcedbd604a418f11e90f9b/browser/base/content/tabbrowser.js#3857-3869 .

```
(root) []
start [dyld]
main [browser/app/nsBrowserApp.cpp]
do_main(int, char**, char**) [browser/app/nsBrowserApp.cpp]
XRE_main(int, char**, mozilla::BootstrapConfig const&) [toolkit/xre/nsAppRunner.cpp]
XREMain::XRE_main []
XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) [toolkit/xre/nsAppRunner.cpp]
XREMain::XRE_mainRun() [toolkit/xre/nsAppRunner.cpp]
nsAppStartup::Run() [toolkit/components/startup/nsAppStartup.cpp]
nsAppShell::Run() [widget/cocoa/nsAppShell.mm]
-[NSApplication run] [AppKit]
-[NSApplication _handleEvent:] [AppKit]
-[GeckoNSApplication sendEvent:] [widget/cocoa/nsAppShell.mm]
-[NSApplication(NSEvent) sendEvent:] [AppKit]
-[ToolbarWindow sendEvent:] [widget/cocoa/nsCocoaWindow.mm]
-[NSWindow(NSEventRouting) sendEvent:] [AppKit]
-[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] [AppKit]
-[ChildView keyDown:] [widget/cocoa/nsChildView.mm]
mozilla::widget::TextInputHandler::HandleKeyDownEvent(NSEvent*, unsigned int) [widget/cocoa/TextInputHandler.mm]
mozilla::widget::TextEventDispatcher::MaybeDispatchKeypressEvents(mozilla::WidgetKeyboardEvent const&, nsEventStatus&, void*, bool) [widget/TextEventDispatcher.cpp]
mozilla::widget::TextEventDispatcher::DispatchKeyboardEventInternal(mozilla::EventMessage, mozilla::WidgetKeyboardEvent const&, nsEventStatus&, void*, unsigned int, bool) [widget/TextEventDispatcher.cpp]
mozilla::widget::TextEventDispatcher::DispatchInputEvent(nsIWidget*, mozilla::WidgetInputEvent&, nsEventStatus&) [widget/TextEventDispatcher.cpp]
nsBaseWidget::DispatchInputEvent(mozilla::WidgetInputEvent*) [widget/nsBaseWidget.cpp]
nsBaseWidget::ProcessUntransformedAPZEvent(mozilla::WidgetInputEvent*, mozilla::layers::APZEventResult const&) [widget/nsBaseWidget.cpp]
nsChildView::DispatchEvent(mozilla::WidgetGUIEvent*, nsEventStatus&) [widget/cocoa/nsChildView.mm]
nsView::HandleEvent(mozilla::WidgetGUIEvent*, bool) [view/nsView.cpp]
nsViewManager::DispatchEvent []
mozilla::PresShell::HandleEvent(nsIFrame*, mozilla::WidgetGUIEvent*, bool, nsEventStatus*) [layout/base/PresShell.cpp]
mozilla::PresShell::EventHandler::HandleEventAtFocusedContent(mozilla::WidgetGUIEvent*, nsEventStatus*) [layout/base/PresShell.cpp]
mozilla::PresShell::EventHandler::HandleEventWithCurrentEventInfo(mozilla::WidgetEvent*, nsEventStatus*, bool, nsIContent*) [layout/base/PresShell.cpp]
mozilla::PresShell::EventHandler::DispatchEvent(mozilla::EventStateManager*, mozilla::WidgetEvent*, bool, nsEventStatus*, nsIContent*) [layout/base/PresShell.cpp]
mozilla::PresShell::EventHandler::DispatchEventToDOM(mozilla::WidgetEvent*, nsEventStatus*, nsPresShellEventCB*) [layout/base/PresShell.cpp]
EventDispatcher::Dispatch []
EventDispatcher::Dispatch keypress []
mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) [dom/events/EventDispatcher.cpp]
mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) [dom/events/EventDispatcher.cpp]
mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) [dom/events/EventDispatcher.cpp]
mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) [dom/events/EventListenerManager.cpp]
mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*) [dom/events/EventListenerManager.cpp]
mozilla::GlobalKeyListener::HandleEvent(mozilla::dom::Event*) [dom/events/GlobalKeyListener.cpp]
mozilla::GlobalKeyListener::WalkHandlersInternal(mozilla::dom::KeyboardEvent*, bool, bool*) [dom/events/GlobalKeyListener.cpp]
mozilla::GlobalKeyListener::WalkHandlersAndExecute(mozilla::dom::KeyboardEvent*, unsigned int, mozilla::IgnoreModifierState const&, bool, bool*) [dom/events/GlobalKeyListener.cpp]
mozilla::KeyEventHandler::DispatchXULKeyCommand(mozilla::dom::Event*) [dom/events/KeyEventHandler.cpp]
nsContentUtils::DispatchXULCommand(nsIContent*, bool, mozilla::dom::Event*, mozilla::PresShell*, bool, bool, bool, bool, unsigned short, short) [dom/base/nsContentUtils.cpp]
mozilla::dom::EventTarget::DispatchEvent(mozilla::dom::Event&, mozilla::ErrorResult&) [dom/events/EventTarget.cpp]
nsINode::DispatchEvent(mozilla::dom::Event&, mozilla::dom::CallerType, mozilla::ErrorResult&) [dom/base/nsINode.cpp]
mozilla::EventDispatcher::DispatchDOMEvent(nsISupports*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsPresContext*, nsEventStatus*) [dom/events/EventDispatcher.cpp]
EventDispatcher::Dispatch []
mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) [dom/events/EventDispatcher.cpp]
mozilla::EventTargetChainItem::PreHandleEvent(mozilla::EventChainVisitor&) [dom/events/EventDispatcher.cpp]
nsXULElement::PreHandleEvent(mozilla::EventChainVisitor&) [dom/xul/nsXULElement.cpp]
nsXULElement::DispatchXULCommand(mozilla::EventChainVisitor const&, nsTAutoStringN<char16_t, (unsigned long)64>&) [dom/xul/nsXULElement.cpp]
nsContentUtils::DispatchXULCommand(nsIContent*, bool, mozilla::dom::Event*, mozilla::PresShell*, bool, bool, bool, bool, unsigned short, short) [dom/base/nsContentUtils.cpp]
mozilla::dom::EventTarget::DispatchEvent(mozilla::dom::Event&, mozilla::ErrorResult&) [dom/events/EventTarget.cpp]
nsINode::DispatchEvent(mozilla::dom::Event&, mozilla::dom::CallerType, mozilla::ErrorResult&) [dom/base/nsINode.cpp]
mozilla::EventDispatcher::DispatchDOMEvent(nsISupports*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsPresContext*, nsEventStatus*) [dom/events/EventDispatcher.cpp]
EventDispatcher::Dispatch []
EventDispatcher::Dispatch command []
mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) [dom/events/EventDispatcher.cpp]
mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) [dom/events/EventDispatcher.cpp]
mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) [dom/events/EventListenerManager.cpp]
mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*) [dom/events/EventListenerManager.cpp]
EventHandlerNonNull []
mozilla::JSEventHandler::HandleEvent(mozilla::dom::Event*) [dom/events/JSEventHandler.cpp]
mozilla::dom::EventHandlerNonNull::Call<nsCOMPtr<mozilla::dom::EventTarget> >(nsCOMPtr<mozilla::dom::EventTarget> const&, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JS::Realm*) [dist/include/mozilla/dom/EventHandlerBinding.h]
mozilla::dom::EventHandlerNonNull::Call(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&) [dom/bindings/EventHandlerBinding.cpp]
JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) [js/src/vm/CallAndConstruct.cpp]
js::RunScript []
oncommand [chrome://browser/content/browser.xhtml:0:0]
BrowserCloseTabOrWindow [chrome://browser/content/browser.js:2968:32]
removeCurrentTab [chrome://browser/content/tabbrowser.js:3787:20]
removeTab [chrome://browser/content/tabbrowser.js:3791:13]
js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) [js/src/vm/Interpreter.cpp]
InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [js/src/vm/Interpreter.cpp]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [js/src/vm/Interpreter.cpp]
js::RunScript(JSContext*, js::RunState&) [js/src/vm/Interpreter.cpp]
Interpret(JSContext*, js::RunState&) [js/src/vm/Interpreter.cpp]
GetPropertyOperation(JSContext*, JS::Handle<js::PropertyName*>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) [js/src/vm/Interpreter.cpp]
js::GetProperty(JSContext*, JS::Handle<JS::Value>, JS::Handle<js::PropertyName*>, JS::MutableHandle<JS::Value>) [js/src/vm/Interpreter.cpp]
js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, js::PropertyName*, JS::MutableHandle<JS::Value>) [js/src/vm/ObjectOperations-inl.h]
js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) [js/src/vm/ObjectOperations-inl.h]
js::Proxy::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) [js/src/proxy/Proxy.cpp]
js::Proxy::getInternal(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) [js/src/proxy/Proxy.cpp]
mozilla::dom::CSS2Properties_Binding::DOMProxyHandler::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) const [dom/bindings/CSS2PropertiesBinding.cpp]
mozilla::dom::GetPropertyOnPrototype(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, bool*, JS::MutableHandle<JS::Value>) [dom/bindings/BindingUtils.cpp]
JS_ForwardGetPropertyTo(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::PropertyKey>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) [js/src/vm/PropertyAndElement.cpp]
js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) [js/src/vm/ObjectOperations-inl.h]
js::NativeGetProperty(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) [js/src/vm/NativeObject.cpp]
NativeGetPropertyInline<(js::AllowGC)1>(JSContext*, js::MaybeRooted<js::NativeObject*, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::Value, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::PropertyKey, (js::AllowGC)1>::HandleType, IsNameLookup, js::MaybeRooted<JS::Value, (js::AllowGC)1>::MutableHandleType) [js/src/vm/NativeObject.cpp]
GetExistingProperty<(js::AllowGC)1>(JSContext*, js::MaybeRooted<JS::Value, (js::AllowGC)1>::HandleType, js::MaybeRooted<js::NativeObject*, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::PropertyKey, (js::AllowGC)1>::HandleType, js::PropertyInfoBase<unsigned int>, js::MaybeRooted<JS::Value, (js::AllowGC)1>::MutableHandleType) [js/src/vm/NativeObject.cpp]
CallGetter(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, js::PropertyInfoBase<unsigned int>, JS::MutableHandle<JS::Value>) [js/src/vm/NativeObject.cpp]
js::CallGetter(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) [js/src/vm/Interpreter.cpp]
js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) [js/src/vm/Interpreter.cpp]
InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [js/src/vm/Interpreter.cpp]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [js/src/vm/Interpreter.cpp]
CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) [js/src/vm/Interpreter.cpp]
mozilla::dom::binding_detail::GenericGetter<mozilla::dom::binding_detail::NormalThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) [dom/bindings/BindingUtils.cpp]
get CSS2Properties.maxWidth []
mozilla::dom::CSS2Properties_Binding::get_maxWidth(JSContext*, JS::Handle<JSObject*>, void*, JSJitGetterCallArgs) [dom/bindings/CSS2PropertiesBinding.cpp]
nsDOMCSSDeclaration::GetMaxWidth(nsTSubstring<char>&, mozilla::ErrorResult&) [layout/style/ServoCSSPropList.h]
nsComputedDOMStyle::GetPropertyValue(nsCSSPropertyID, nsTSubstring<char>&) [layout/style/nsComputedDOMStyle.cpp]
nsComputedDOMStyle::GetPropertyValue(nsCSSPropertyID, nsTSubstring<char> const&, nsTSubstring<char>&) [layout/style/nsComputedDOMStyle.cpp]
nsComputedDOMStyle::UpdateCurrentStyleSources(nsCSSPropertyID) [layout/style/nsComputedDOMStyle.cpp]
nsComputedDOMStyle::Flush(mozilla::dom::Document&, mozilla::FlushType) [layout/style/nsComputedDOMStyle.cpp]
mozilla::dom::Document::FlushPendingNotifications(mozilla::FlushType) [dom/base/Document.cpp]
mozilla::dom::Document::FlushPendingNotifications(mozilla::ChangesToFlush) [dom/base/Document.cpp]
mozilla::PresShell::FlushPendingNotifications(mozilla::ChangesToFlush) [layout/base/PresShell.h]
```

From asynctabswitcher when setting focus to something after closing the previous tab:
```
(root) []
start [dyld]
main [browser/app/nsBrowserApp.cpp]
do_main(int, char**, char**) [browser/app/nsBrowserApp.cpp]
XRE_main(int, char**, mozilla::BootstrapConfig const&) [toolkit/xre/nsAppRunner.cpp]
XREMain::XRE_main []
XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) [toolkit/xre/nsAppRunner.cpp]
XREMain::XRE_mainRun() [toolkit/xre/nsAppRunner.cpp]
nsAppStartup::Run() [toolkit/components/startup/nsAppStartup.cpp]
nsAppShell::Run() [widget/cocoa/nsAppShell.mm]
-[NSApplication run] [AppKit]
-[GeckoNSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] [widget/cocoa/nsAppShell.mm]
-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] [AppKit]
_DPSNextEvent [AppKit]
_BlockUntilNextEventMatchingListInModeWithFilter [HIToolbox]
ReceiveNextEventCommon [HIToolbox]
RunCurrentEventLoopInMode [HIToolbox]
CFRunLoopRunSpecific [CoreFoundation]
__CFRunLoopRun [CoreFoundation]
__CFRunLoopDoSources0 [CoreFoundation]
__CFRunLoopDoSource0 [CoreFoundation]
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ [CoreFoundation]
nsAppShell::ProcessGeckoEvents []
nsAppShell::ProcessGeckoEvents(void*) [widget/cocoa/nsAppShell.mm]
nsBaseAppShell::NativeEventCallback() [widget/nsBaseAppShell.cpp]
NS_ProcessPendingEvents(nsIThread*, unsigned int) [xpcom/threads/nsThreadUtils.cpp]
nsThread::ProcessNextEvent(bool, bool*) [xpcom/threads/nsThread.cpp]
mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_4>::Run() [xpcom/threads/nsThreadUtils.h]
mozilla::TaskController::InitializeInternal()::$_4::operator()() const [xpcom/threads/TaskController.cpp]
mozilla::TaskController::ProcessPendingMTTask(bool) [xpcom/threads/TaskController.cpp]
mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) [xpcom/threads/TaskController.cpp]
Task PCompositorBridge::Msg_ObserveLayersUpdate []
mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) [xpcom/threads/TaskController.cpp]
mozilla::RunnableTask::Run() [xpcom/threads/TaskController.cpp]
mozilla::ipc::MessageChannel::MessageTask::Run() [ipc/glue/MessageChannel.cpp]
mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::ipc::MessageChannel::MessageTask&) [ipc/glue/MessageChannel.cpp]
mozilla::ipc::MessageChannel::DispatchMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::UniquePtr<IPC::Message, mozilla::DefaultDelete<IPC::Message> >) [ipc/glue/MessageChannel.cpp]
mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) [ipc/glue/MessageChannel.cpp]
mozilla::layers::PCompositorManagerChild::OnMessageReceived(IPC::Message const&) [ipc/ipdl/PCompositorManagerChild.cpp]
PCompositorBridge::Msg_ObserveLayersUpdate []
mozilla::layers::PCompositorBridgeChild::OnMessageReceived(IPC::Message const&) [ipc/ipdl/PCompositorBridgeChild.cpp]
mozilla::layers::CompositorBridgeChild::RecvObserveLayersUpdate(mozilla::layers::LayersId const&, mozilla::layers::LayersObserverEpoch const&, bool const&) [gfx/layers/ipc/CompositorBridgeChild.cpp]
mozilla::dom::BrowserParent::LayerTreeUpdate(mozilla::layers::LayersObserverEpoch const&, bool) [dom/ipc/BrowserParent.cpp]
mozilla::dom::EventTarget::DispatchEvent(mozilla::dom::Event&) [dom/events/EventTarget.cpp]
nsINode::DispatchEvent(mozilla::dom::Event&, mozilla::dom::CallerType, mozilla::ErrorResult&) [dom/base/nsINode.cpp]
mozilla::EventDispatcher::DispatchDOMEvent(nsISupports*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsPresContext*, nsEventStatus*) [dom/events/EventDispatcher.cpp]
EventDispatcher::Dispatch []
EventDispatcher::Dispatch MozLayerTreeReady []
mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) [dom/events/EventDispatcher.cpp]
mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) [dom/events/EventDispatcher.cpp]
mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) [dom/events/EventListenerManager.cpp]
EventListener.handleEvent []
mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*) [dom/events/EventListenerManager.cpp]
mozilla::dom::EventListener::HandleEvent<mozilla::dom::EventTarget*>(mozilla::dom::EventTarget* const&, mozilla::dom::Event&, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JS::Realm*) [dist/include/mozilla/dom/EventListenerBinding.h]
mozilla::dom::EventListener::HandleEvent(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::dom::Event&, mozilla::ErrorResult&) [dom/bindings/EventListenerBinding.cpp]
JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) [js/src/vm/CallAndConstruct.cpp]
js::RunScript []
handleEvent [resource:///modules/AsyncTabSwitcher.jsm:1079:13]
postActions [resource:///modules/AsyncTabSwitcher.jsm:610:13]
updateDisplay [resource:///modules/AsyncTabSwitcher.jsm:356:15]
_adjustFocusAfterTabSwitch [chrome://browser/content/tabbrowser.js:1457:30]
js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) [js/src/vm/Interpreter.cpp]
InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [js/src/vm/Interpreter.cpp]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [js/src/vm/Interpreter.cpp]
js::RunScript(JSContext*, js::RunState&) [js/src/vm/Interpreter.cpp]
Interpret(JSContext*, js::RunState&) [js/src/vm/Interpreter.cpp]
js::CallFromStack(JSContext*, JS::CallArgs const&, js::CallReason) [js/src/vm/Interpreter.cpp]
InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [js/src/vm/Interpreter.cpp]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [js/src/vm/Interpreter.cpp]
CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) [js/src/vm/Interpreter.cpp]
XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*) [js/xpconnect/src/XPCWrappedNativeJSOps.cpp]
nsIFocusManager.setFocus []
XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode) [js/xpconnect/src/XPCWrappedNative.cpp]
CallMethodHelper::Call() [js/xpconnect/src/XPCWrappedNative.cpp]
CallMethodHelper::Invoke() [js/xpconnect/src/XPCWrappedNative.cpp]
NS_InvokeByIndex [xpcom/reflect/xptcall/md/unix/xptcinvoke_aarch64.cpp]
_NS_InvokeByIndex [XUL]
nsFocusManager::SetFocus(mozilla::dom::Element*, unsigned int) [dom/base/nsFocusManager.cpp]
nsFocusManager::SetFocusInner(mozilla::dom::Element*, int, bool, bool) [dom/base/nsFocusManager.cpp]
nsFocusManager::FlushAndCheckIfFocusable(mozilla::dom::Element*, unsigned int) [dom/base/nsFocusManager.cpp]
mozilla::dom::Document::FlushPendingNotifications(mozilla::FlushType) [dom/base/Document.cpp]
mozilla::dom::Document::FlushPendingNotifications(mozilla::ChangesToFlush) [dom/base/Document.cpp]
mozilla::PresShell::FlushPendingNotifications(mozilla::ChangesToFlush) [layout/base/PresShell.h]
```