Bug 1538028 - Part 4: Pass TriggeringRemoteType through the frontend, r=Gijs,emilio
Propagate the ability to pass triggeringRemoteType through the desktop frontend in various places, such that it is set when using the context menu or content click handler. Differential Revision: https://phabricator.services.mozilla.com/D161834
This commit is contained in:
@@ -435,6 +435,17 @@ nsresult nsDocShellLoadState::CreateFromLoadURIOptions(
|
||||
nsDocShell::MaybeNotifyKeywordSearchLoading(searchProvider, keyword);
|
||||
}
|
||||
|
||||
if (aLoadURIOptions.mTriggeringRemoteType.WasPassed()) {
|
||||
if (XRE_IsParentProcess()) {
|
||||
loadState->SetTriggeringRemoteType(
|
||||
aLoadURIOptions.mTriggeringRemoteType.Value());
|
||||
} else if (ContentChild::GetSingleton()->GetRemoteType() !=
|
||||
aLoadURIOptions.mTriggeringRemoteType.Value()) {
|
||||
NS_WARNING("Invalid TriggeringRemoteType from LoadURIOptions in content");
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
}
|
||||
|
||||
if (aLoadURIOptions.mRemoteTypeOverride.WasPassed()) {
|
||||
loadState->SetRemoteTypeOverride(
|
||||
aLoadURIOptions.mRemoteTypeOverride.Value());
|
||||
|
||||
Reference in New Issue
Block a user