summaryrefslogtreecommitdiffstats
path: root/dom/ipc/ContentChild.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/ipc/ContentChild.cpp')
-rw-r--r--dom/ipc/ContentChild.cpp16
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();
}