Bug 1386404 - Enable access to the entire chrome dir from content. r=jld

This may be required if people have @import in their userContent.css, and
in any case our tests check for this.

MozReview-Commit-ID: 8uJcWiC2rli

--HG--
extra : rebase_source : 38bd2a2ffc593bf94b3c16f0c755d169d5998f7f
This commit is contained in:
Gian-Carlo Pascutto 2017-10-26 18:57:03 +02:00
Родитель fff36a228d
Коммит 88fc2f8563
1 изменённых файлов: 3 добавлений и 6 удалений

Просмотреть файл

@ -450,14 +450,11 @@ SandboxBrokerPolicyFactory::GetContentPolicy(int aPid, bool aFileProcess)
rv = profileDir->Clone(getter_AddRefs(workDir));
if (NS_SUCCEEDED(rv)) {
rv = workDir->AppendNative(NS_LITERAL_CSTRING("chrome"));
if (NS_SUCCEEDED(rv)) {
rv = workDir->AppendNative(NS_LITERAL_CSTRING("userContent.css"));
if (NS_SUCCEEDED(rv)) {
nsAutoCString tmpPath;
rv = workDir->GetNativePath(tmpPath);
if (NS_SUCCEEDED(rv)) {
policy->AddPath(rdonly, tmpPath.get());
}
policy->AddDir(rdonly, tmpPath.get());
}
}
}