diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /docshell/base/BrowsingContext.cpp | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docshell/base/BrowsingContext.cpp')
-rw-r--r-- | docshell/base/BrowsingContext.cpp | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/docshell/base/BrowsingContext.cpp b/docshell/base/BrowsingContext.cpp index 141036a86c..6e1a1b6893 100644 --- a/docshell/base/BrowsingContext.cpp +++ b/docshell/base/BrowsingContext.cpp @@ -20,6 +20,7 @@ #endif #include "mozilla/AppShutdown.h" #include "mozilla/dom/CanonicalBrowsingContext.h" +#include "mozilla/dom/BindingIPCUtils.h" #include "mozilla/dom/BrowserHost.h" #include "mozilla/dom/BrowserChild.h" #include "mozilla/dom/BrowserParent.h" @@ -96,23 +97,17 @@ namespace IPC { // Allow serialization and deserialization of OrientationType over IPC template <> struct ParamTraits<mozilla::dom::OrientationType> - : public ContiguousEnumSerializer< - mozilla::dom::OrientationType, - mozilla::dom::OrientationType::Portrait_primary, - mozilla::dom::OrientationType::EndGuard_> {}; + : public mozilla::dom::WebIDLEnumSerializer<mozilla::dom::OrientationType> { +}; template <> struct ParamTraits<mozilla::dom::DisplayMode> - : public ContiguousEnumSerializer<mozilla::dom::DisplayMode, - mozilla::dom::DisplayMode::Browser, - mozilla::dom::DisplayMode::EndGuard_> {}; + : public mozilla::dom::WebIDLEnumSerializer<mozilla::dom::DisplayMode> {}; template <> struct ParamTraits<mozilla::dom::PrefersColorSchemeOverride> - : public ContiguousEnumSerializer< - mozilla::dom::PrefersColorSchemeOverride, - mozilla::dom::PrefersColorSchemeOverride::None, - mozilla::dom::PrefersColorSchemeOverride::EndGuard_> {}; + : public mozilla::dom::WebIDLEnumSerializer< + mozilla::dom::PrefersColorSchemeOverride> {}; template <> struct ParamTraits<mozilla::dom::ExplicitActiveStatus> @@ -124,10 +119,8 @@ struct ParamTraits<mozilla::dom::ExplicitActiveStatus> // Allow serialization and deserialization of TouchEventsOverride over IPC template <> struct ParamTraits<mozilla::dom::TouchEventsOverride> - : public ContiguousEnumSerializer< - mozilla::dom::TouchEventsOverride, - mozilla::dom::TouchEventsOverride::Disabled, - mozilla::dom::TouchEventsOverride::EndGuard_> {}; + : public mozilla::dom::WebIDLEnumSerializer< + mozilla::dom::TouchEventsOverride> {}; template <> struct ParamTraits<mozilla::dom::EmbedderColorSchemes> { @@ -168,6 +161,9 @@ static StaticAutoPtr<BrowsingContextMap> sBrowsingContexts; // Top-level Content BrowsingContexts only, indexed by BrowserId instead of Id static StaticAutoPtr<BrowsingContextMap> sCurrentTopByBrowserId; +static bool gIPCEnabledAnnotation = false; +static bool gFissionEnabledAnnotation = false; + static void UnregisterBrowserId(BrowsingContext* aBrowsingContext) { if (!aBrowsingContext->IsTopContent() || !sCurrentTopByBrowserId) { return; @@ -255,6 +251,11 @@ void BrowsingContext::Init() { sCurrentTopByBrowserId = new BrowsingContextMap(); ClearOnShutdown(&sBrowsingContexts); ClearOnShutdown(&sCurrentTopByBrowserId); + CrashReporter::RegisterAnnotationBool( + CrashReporter::Annotation::DOMIPCEnabled, &gIPCEnabledAnnotation); + CrashReporter::RegisterAnnotationBool( + CrashReporter::Annotation::DOMFissionEnabled, + &gFissionEnabledAnnotation); } } @@ -1665,11 +1666,8 @@ NS_IMETHODIMP BrowsingContext::SetRemoteTabs(bool aUseRemoteTabs) { return NS_ERROR_FAILURE; } - static bool annotated = false; - if (aUseRemoteTabs && !annotated) { - annotated = true; - CrashReporter::AnnotateCrashReport(CrashReporter::Annotation::DOMIPCEnabled, - true); + if (aUseRemoteTabs && !gIPCEnabledAnnotation) { + gIPCEnabledAnnotation = true; } // Don't allow non-remote tabs with remote subframes. @@ -1693,11 +1691,8 @@ NS_IMETHODIMP BrowsingContext::SetRemoteSubframes(bool aUseRemoteSubframes) { return NS_ERROR_FAILURE; } - static bool annotated = false; - if (aUseRemoteSubframes && !annotated) { - annotated = true; - CrashReporter::AnnotateCrashReport( - CrashReporter::Annotation::DOMFissionEnabled, true); + if (aUseRemoteSubframes && !gFissionEnabledAnnotation) { + gFissionEnabledAnnotation = true; } // Don't allow non-remote tabs with remote subframes. |