[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-115.32.0esr-13.5-1] Bug 1996718 - Check whether BrowserChild has not yet been destroyed in each...



Title: GitLab

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:

Changes:

  • gfx/layers/apz/util/ContentProcessController.cpp
    ... ... @@ -31,7 +31,7 @@ void ContentProcessController::NotifyLayerTransforms(
    31 31
     
    
    32 32
     void ContentProcessController::RequestContentRepaint(
    
    33 33
         const RepaintRequest& aRequest) {
    
    34
    -  if (mBrowser) {
    
    34
    +  if (mBrowser && !mBrowser->IsDestroyed()) {
    
    35 35
         mBrowser->UpdateFrame(aRequest);
    
    36 36
       }
    
    37 37
     }
    
    ... ... @@ -56,7 +56,7 @@ void ContentProcessController::NotifyPinchGesture(
    56 56
     void ContentProcessController::NotifyAPZStateChange(
    
    57 57
         const ScrollableLayerGuid& aGuid, APZStateChange aChange, int aArg,
    
    58 58
         Maybe<uint64_t> aInputBlockId) {
    
    59
    -  if (mBrowser) {
    
    59
    +  if (mBrowser && !mBrowser->IsDestroyed()) {
    
    60 60
         mBrowser->NotifyAPZStateChange(aGuid.mScrollId, aChange, aArg,
    
    61 61
                                        aInputBlockId);
    
    62 62
       }
    
    ... ... @@ -64,13 +64,13 @@ void ContentProcessController::NotifyAPZStateChange(
    64 64
     
    
    65 65
     void ContentProcessController::NotifyMozMouseScrollEvent(
    
    66 66
         const ScrollableLayerGuid::ViewID& aScrollId, const nsString& aEvent) {
    
    67
    -  if (mBrowser) {
    
    67
    +  if (mBrowser && !mBrowser->IsDestroyed()) {
    
    68 68
         APZCCallbackHelper::NotifyMozMouseScrollEvent(aScrollId, aEvent);
    
    69 69
       }
    
    70 70
     }
    
    71 71
     
    
    72 72
     void ContentProcessController::NotifyFlushComplete() {
    
    73
    -  if (mBrowser) {
    
    73
    +  if (mBrowser && !mBrowser->IsDestroyed()) {
    
    74 74
         RefPtr<PresShell> presShell = mBrowser->GetTopLevelPresShell();
    
    75 75
         APZCCallbackHelper::NotifyFlushComplete(presShell);
    
    76 76
       }
    
    ... ... @@ -113,7 +113,7 @@ void ContentProcessController::DispatchToRepaintThread(
    113 113
     }
    
    114 114
     
    
    115 115
     PresShell* ContentProcessController::GetTopLevelPresShell() const {
    
    116
    -  if (!mBrowser) {
    
    116
    +  if (!mBrowser || mBrowser->IsDestroyed()) {
    
    117 117
         return nullptr;
    
    118 118
       }
    
    119 119
       return mBrowser->GetTopLevelPresShell();
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx