summaryrefslogtreecommitdiffstats
path: root/dom/ipc/WindowGlobalParent.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /dom/ipc/WindowGlobalParent.cpp
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/ipc/WindowGlobalParent.cpp')
-rw-r--r--dom/ipc/WindowGlobalParent.cpp28
1 files changed, 25 insertions, 3 deletions
diff --git a/dom/ipc/WindowGlobalParent.cpp b/dom/ipc/WindowGlobalParent.cpp
index f60790a155..4379c7280c 100644
--- a/dom/ipc/WindowGlobalParent.cpp
+++ b/dom/ipc/WindowGlobalParent.cpp
@@ -10,6 +10,7 @@
#include "mozilla/AntiTrackingUtils.h"
#include "mozilla/AsyncEventDispatcher.h"
+#include "mozilla/BounceTrackingStorageObserver.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/ContentBlockingAllowList.h"
#include "mozilla/dom/InProcessParent.h"
@@ -75,7 +76,7 @@
#include "mozilla/net/PCookieServiceParent.h"
#include "mozilla/net/CookieServiceParent.h"
-#include "SessionStoreFunctions.h"
+#include "nsISessionStoreFunctions.h"
#include "nsIXPConnect.h"
#include "nsImportModule.h"
#include "nsIXULRuntime.h"
@@ -1705,8 +1706,29 @@ IPCResult WindowGlobalParent::RecvSetCookies(
aCookies, GetBrowsingContext());
}
-NS_IMPL_CYCLE_COLLECTION_INHERITED(WindowGlobalParent, WindowContext,
- mPageUseCountersWindow)
+IPCResult WindowGlobalParent::RecvOnInitialStorageAccess() {
+ DebugOnly<nsresult> rv =
+ BounceTrackingStorageObserver::OnInitialStorageAccess(this);
+ NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Failed to notify storage access");
+ return IPC_OK();
+}
+
+NS_IMPL_CYCLE_COLLECTION_CLASS(WindowGlobalParent)
+
+NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(WindowGlobalParent,
+ WindowContext)
+ NS_IMPL_CYCLE_COLLECTION_UNLINK(mPageUseCountersWindow)
+ tmp->UnlinkManager();
+NS_IMPL_CYCLE_COLLECTION_UNLINK_END
+
+NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(WindowGlobalParent,
+ WindowContext)
+ NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPageUseCountersWindow)
+ if (!tmp->IsInProcess()) {
+ CycleCollectionNoteChild(cb, static_cast<BrowserParent*>(tmp->Manager()),
+ "Manager()");
+ }
+NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(WindowGlobalParent,
WindowContext)