ma1 pushed to branch mullvad-browser-140.7.0esr-15.0-1 at The Tor Project / 
Applications / Mullvad Browser


Commits:
86bb5b91 by Hiroyuki Ikezoe at 2026-01-12T12:19:31+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
=====================================
@@ -32,7 +32,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/mullvad-browser/-/commit/86bb5b910ae685056dd68141a23faa43d27ec26d

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/86bb5b910ae685056dd68141a23faa43d27ec26d
You're receiving this email because of your account on gitlab.torproject.org.


_______________________________________________
tor-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to