diff options
Diffstat (limited to 'gfx/ipc/InProcessCompositorSession.cpp')
-rw-r--r-- | gfx/ipc/InProcessCompositorSession.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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> InProcessCompositorSession::Create( } void InProcessCompositorSession::NotifySessionLost() { - mWidget->NotifyCompositorSessionLost(this); + // Hold a reference to mWidget since NotifyCompositorSessionLost may + // release the last reference mid-execution. + RefPtr<nsBaseWidget> widget(mWidget); + widget->NotifyCompositorSessionLost(this); } CompositorBridgeParent* InProcessCompositorSession::GetInProcessBridge() const { |