Bug 1087744: Make JS callers of ios.newChannel call ios.newChannel2 in toolkit/components/osfile (r=yoric)

This commit is contained in:
Christoph Kerschbaumer 2015-02-10 20:49:36 -08:00
Родитель 95f1e859d8
Коммит 04f5e67841
1 изменённых файлов: 9 добавлений и 2 удалений

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

@ -89,7 +89,8 @@ let reference_fetch_file = function reference_fetch_file(path, test) {
test.info("Fetching file " + path);
let promise = Promise.defer();
let file = new FileUtils.File(path);
NetUtil.asyncFetch(file,
NetUtil.asyncFetch2(
file,
function(stream, status) {
if (!Components.isSuccessCode(status)) {
promise.reject(status);
@ -107,7 +108,13 @@ let reference_fetch_file = function reference_fetch_file(path, test) {
} else {
promise.resolve(result);
}
});
},
null, // aLoadingNode
Services.scriptSecurityManager.getSystemPrincipal(),
null, // aTriggeringPrincipal
Ci.nsILoadInfo.SEC_NORMAL,
Ci.nsIContentPolicy.TYPE_OTHER);
return promise.promise;
};