Bug 1184701 - Make the moz-page-thumb protocol work in the privileged about content process. r=haik,valentin

Differential Revision: https://phabricator.services.mozilla.com/D68281
This commit is contained in:
Mike Conley
2020-03-31 22:40:11 +00:00
parent b823c4c87a
commit fa1cf52506
17 changed files with 724 additions and 213 deletions

View File

@@ -55,6 +55,8 @@
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/NullPrincipal.h"
#include <stdint.h>
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/nsCSPContext.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/ClearOnShutdown.h"
@@ -925,6 +927,15 @@ nsresult nsScriptSecurityManager::CheckLoadURIFlags(
return NS_OK;
}
}
} else if (targetScheme.EqualsLiteral("moz-page-thumb")) {
if (XRE_IsParentProcess()) {
return NS_OK;
}
auto& remoteType = dom::ContentChild::GetSingleton()->GetRemoteType();
if (remoteType.EqualsLiteral(PRIVILEGEDABOUT_REMOTE_TYPE)) {
return NS_OK;
}
}
}