From 84e003dae2e0aec51a61d7dd5f6ede580381c580 Mon Sep 17 00:00:00 2001 From: Christoph Kerschbaumer Date: Thu, 5 Feb 2015 12:53:14 -0800 Subject: [PATCH] Bug 1087728: Make JS callers of ios.newChannel call ios.newChannel2 in dom/system (r=fabrice) --- dom/system/gonk/NetworkService.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dom/system/gonk/NetworkService.js b/dom/system/gonk/NetworkService.js index 15c9b08c9ab4..0789cb1a2aad 100644 --- a/dom/system/gonk/NetworkService.js +++ b/dom/system/gonk/NetworkService.js @@ -131,7 +131,7 @@ NetworkService.prototype = { return; } - NetUtil.asyncFetch(file, function(inputStream, status) { + NetUtil.asyncFetch2(file, function(inputStream, status) { let rxBytes = 0, txBytes = 0, now = Date.now(); @@ -154,7 +154,12 @@ NetworkService.prototype = { // netd always return success even interface doesn't exist. callback.networkStatsAvailable(true, rxBytes, txBytes, now); - }); + }, + null, // aLoadingNode + Services.scriptSecurityManager.getSystemPrincipal(), + null, // aTriggeringPrincipal + Ci.nsILoadInfo.SEC_NORMAL, + Ci.nsIContentPolicy.TYPE_OTHER); }, setNetworkInterfaceAlarm: function(networkName, threshold, callback) {