From 41eb897104aba1f2127c593d7040e6ef0db684d5 Mon Sep 17 00:00:00 2001 From: Andreas Farre Date: Mon, 29 Apr 2019 07:01:38 +0000 Subject: [PATCH] Bug 1533447 - Part 1: Sync cached browsing contexts to non-owning child processes. r=nika Differential Revision: https://phabricator.services.mozilla.com/D28668 --HG-- extra : moz-landing-system : lando --- dom/ipc/ContentParent.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index b228e0784e34..013b8dee52dd 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -5700,6 +5700,17 @@ mozilla::ipc::IPCResult ContentParent::RecvDetachBrowsingContext( aContext->Detach(/* aFromIPC */ true); } + for (auto iter = aContext->Group()->ContentParentsIter(); !iter.Done(); + iter.Next()) { + nsRefPtrHashKey* entry = iter.Get(); + if (entry->GetKey() == this) { + continue; + } + + Unused << entry->GetKey()->SendDetachBrowsingContext(aContext, + aMoveToBFCache); + } + return IPC_OK(); }