Pier Angelo Vendrame pushed to branch tor-browser-115.32.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: b97ff46f by Hiroyuki Ikezoe at 2026-01-08T23:23:20+01:00 Bug 1996718 - Check whether BrowserChild has not yet been destroyed in each function of ContentProcessController. r=botond Differential Revision: https://phabricator.services.mozilla.com/D270278 - - - - - 1 changed file: - gfx/layers/apz/util/ContentProcessController.cpp Changes: ===================================== gfx/layers/apz/util/ContentProcessController.cpp ===================================== @@ -31,7 +31,7 @@ void ContentProcessController::NotifyLayerTransforms( void ContentProcessController::RequestContentRepaint( const RepaintRequest& aRequest) { - if (mBrowser) { + if (mBrowser && !mBrowser->IsDestroyed()) { mBrowser->UpdateFrame(aRequest); } } @@ -56,7 +56,7 @@ void ContentProcessController::NotifyPinchGesture( void ContentProcessController::NotifyAPZStateChange( const ScrollableLayerGuid& aGuid, APZStateChange aChange, int aArg, Maybe<uint64_t> aInputBlockId) { - if (mBrowser) { + if (mBrowser && !mBrowser->IsDestroyed()) { mBrowser->NotifyAPZStateChange(aGuid.mScrollId, aChange, aArg, aInputBlockId); } @@ -64,13 +64,13 @@ void ContentProcessController::NotifyAPZStateChange( void ContentProcessController::NotifyMozMouseScrollEvent( const ScrollableLayerGuid::ViewID& aScrollId, const nsString& aEvent) { - if (mBrowser) { + if (mBrowser && !mBrowser->IsDestroyed()) { APZCCallbackHelper::NotifyMozMouseScrollEvent(aScrollId, aEvent); } } void ContentProcessController::NotifyFlushComplete() { - if (mBrowser) { + if (mBrowser && !mBrowser->IsDestroyed()) { RefPtr<PresShell> presShell = mBrowser->GetTopLevelPresShell(); APZCCallbackHelper::NotifyFlushComplete(presShell); } @@ -113,7 +113,7 @@ void ContentProcessController::DispatchToRepaintThread( } PresShell* ContentProcessController::GetTopLevelPresShell() const { - if (!mBrowser) { + if (!mBrowser || mBrowser->IsDestroyed()) { return nullptr; } return mBrowser->GetTopLevelPresShell(); View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/b97ff46f... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/b97ff46f... You're receiving this email because of your account on gitlab.torproject.org.