зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1087744: Make JS callers of ios.newChannel call ios.newChannel2 in toolkit/components/osfile (r=yoric)
This commit is contained in:
Родитель
95f1e859d8
Коммит
04f5e67841
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче