Bug 781323: fix about:sync-log, r=gps

--HG--
extra : rebase_source : 168339ad89dd0263b83deb7d9b028d59562cffe0
This commit is contained in:
Gavin Sharp 2012-08-14 15:37:04 -04:00
Родитель be03f533f3
Коммит 353b7404d9
1 изменённых файлов: 6 добавлений и 4 удалений

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

@ -59,10 +59,12 @@ AboutWeaveLog.prototype = {
let channel = Services.io.newChannelFromURI(uri);
channel.originalURI = aURI;
// Setting the owner to null means that we'll go through the normal
// path in GetChannelPrincipal and create a codebase principal based
// on the channel's originalURI
channel.owner = null;
// Ensure that the about page has the same privileges as a regular directory
// view. That way links to files can be opened.
let ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
.getService(Ci.nsIScriptSecurityManager);
let principal = ssm.getSimpleCodebasePrincipal(uri);
channel.owner = principal;
return channel;
}
};