diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /dom/ipc/ContentChild.cpp | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/ipc/ContentChild.cpp')
-rw-r--r-- | dom/ipc/ContentChild.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index 7507d88fe0..2ebdd303d8 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -2310,8 +2310,10 @@ mozilla::ipc::IPCResult ContentChild::RecvThemeChanged( mozilla::ipc::IPCResult ContentChild::RecvLoadProcessScript( const nsString& aURL) { auto* global = ContentProcessMessageManager::Get(); - global->LoadScript(aURL); - return IPC_OK(); + if (global && global->LoadScript(aURL)) { + return IPC_OK(); + } + return IPC_FAIL(this, "ContentProcessMessageManager::LoadScript failed"); } mozilla::ipc::IPCResult ContentChild::RecvAsyncMessage( @@ -3923,7 +3925,8 @@ mozilla::ipc::IPCResult ContentChild::RecvRaiseWindow( mozilla::ipc::IPCResult ContentChild::RecvAdjustWindowFocus( const MaybeDiscarded<BrowsingContext>& aContext, bool aIsVisible, - uint64_t aActionId) { + uint64_t aActionId, bool aShouldClearAncestorFocus, + const MaybeDiscarded<BrowsingContext>& aAncestorBrowsingContextToFocus) { if (aContext.IsNullOrDiscarded()) { MOZ_LOG(BrowsingContext::GetLog(), LogLevel::Debug, ("ChildIPC: Trying to send a message to dead or detached context")); @@ -3932,7 +3935,12 @@ mozilla::ipc::IPCResult ContentChild::RecvAdjustWindowFocus( if (RefPtr<nsFocusManager> fm = nsFocusManager::GetFocusManager()) { RefPtr<BrowsingContext> bc = aContext.get(); - fm->AdjustInProcessWindowFocus(bc, false, aIsVisible, aActionId); + RefPtr<BrowsingContext> ancestor = + aAncestorBrowsingContextToFocus.IsNullOrDiscarded() + ? nullptr + : aAncestorBrowsingContextToFocus.get(); + fm->AdjustInProcessWindowFocus(bc, false, aIsVisible, aActionId, + aShouldClearAncestorFocus, ancestor); } return IPC_OK(); } |