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

[tor-commits] [tor-browser] 27/37: Bug 1772651 - Check if the actor is dead in GetOtherInProcessActor, r=mccr8 a=RyanVM



This is an automated email from the git hooks/post-receive script.

richard pushed a commit to branch tor-browser-91.11.0esr-11.5-1
in repository tor-browser.

commit 6e8c253e5c4c30326d516a078a1ac6beb54d7615
Author: Nika Layzell <nika@xxxxxxxxxxxxxxx>
AuthorDate: Tue Jun 7 19:08:35 2022 +0000

    Bug 1772651 - Check if the actor is dead in GetOtherInProcessActor, r=mccr8 a=RyanVM
    
    Differential Revision: https://phabricator.services.mozilla.com/D148540
---
 dom/ipc/InProcessImpl.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dom/ipc/InProcessImpl.cpp b/dom/ipc/InProcessImpl.cpp
index 826db966c1492..6dbf484d131fd 100644
--- a/dom/ipc/InProcessImpl.cpp
+++ b/dom/ipc/InProcessImpl.cpp
@@ -264,14 +264,14 @@ static IProtocol* GetOtherInProcessActor(IProtocol* aActor) {
 
   // Discover the manager of aActor which is PInProcess.
   IProtocol* current = aActor;
-  while (current) {
+  while (current && current->CanRecv()) {
     if (current->GetProtocolId() == PInProcessMsgStart) {
       break;  // Found the correct actor.
     }
     current = current->Manager();
   }
-  if (!current) {
-    return nullptr;  // Not a PInProcess actor, return |nullptr|
+  if (!current || !current->CanRecv()) {
+    return nullptr;  // Not a live PInProcess actor, return |nullptr|
   }
 
   MOZ_ASSERT(current->GetSide() == aActor->GetSide(), "side changed?");

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits