Bug 1896709 - Part 10: Add SharedScriptCache. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D215879
This commit is contained in:
@@ -273,6 +273,21 @@ void ScriptLoader::SetGlobalObject(nsIGlobalObject* aGlobalObject) {
|
||||
mModuleLoader);
|
||||
}
|
||||
|
||||
nsIPrincipal* ScriptLoader::LoaderPrincipal() const {
|
||||
return mDocument->NodePrincipal();
|
||||
}
|
||||
|
||||
nsIPrincipal* ScriptLoader::PartitionedPrincipal() const {
|
||||
if (mDocument && StaticPrefs::privacy_partition_network_state()) {
|
||||
return mDocument->PartitionedPrincipal();
|
||||
}
|
||||
return LoaderPrincipal();
|
||||
}
|
||||
|
||||
bool ScriptLoader::ShouldBypassCache() const {
|
||||
return mDocument && nsContentUtils::ShouldBypassSubResourceCache(mDocument);
|
||||
}
|
||||
|
||||
void ScriptLoader::RegisterContentScriptModuleLoader(ModuleLoader* aLoader) {
|
||||
MOZ_ASSERT(aLoader);
|
||||
MOZ_ASSERT(aLoader->GetScriptLoader() == this);
|
||||
|
||||
Reference in New Issue
Block a user