From f3bcaf9f88aad2c423ebcd61121562f9834187d4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 8 Apr 2024 17:11:27 +0200 Subject: Merging upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- gfx/ipc/InProcessCompositorSession.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gfx/ipc/InProcessCompositorSession.cpp') diff --git a/gfx/ipc/InProcessCompositorSession.cpp b/gfx/ipc/InProcessCompositorSession.cpp index f5f94461cb..9efb83b57a 100644 --- a/gfx/ipc/InProcessCompositorSession.cpp +++ b/gfx/ipc/InProcessCompositorSession.cpp @@ -61,7 +61,10 @@ RefPtr InProcessCompositorSession::Create( } void InProcessCompositorSession::NotifySessionLost() { - mWidget->NotifyCompositorSessionLost(this); + // Hold a reference to mWidget since NotifyCompositorSessionLost may + // release the last reference mid-execution. + RefPtr widget(mWidget); + widget->NotifyCompositorSessionLost(this); } CompositorBridgeParent* InProcessCompositorSession::GetInProcessBridge() const { -- cgit v1.2.3