зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1087735: Make JS callers of ios.newChannel call ios.newChannel2 in layout/ (r=dbaron)
This commit is contained in:
Родитель
9081805245
Коммит
cc96f3ae3c
|
@ -36,8 +36,9 @@ const NS_DIRECTORY_SERVICE_CONTRACTID =
|
|||
const NS_OBSERVER_SERVICE_CONTRACTID =
|
||||
"@mozilla.org/observer-service;1";
|
||||
|
||||
Components.utils.import("resource://gre/modules/FileUtils.jsm");
|
||||
Components.utils.import("chrome://reftest/content/httpd.jsm", this);
|
||||
CU.import("resource://gre/modules/FileUtils.jsm");
|
||||
CU.import("chrome://reftest/content/httpd.jsm", this);
|
||||
CU.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
var gLoadTimeout = 0;
|
||||
var gTimeoutHook = null;
|
||||
|
@ -798,7 +799,12 @@ function ReadManifest(aURL, inherited_status)
|
|||
.getService(CI.nsIScriptSecurityManager);
|
||||
|
||||
var listURL = aURL;
|
||||
var channel = gIOService.newChannelFromURI(aURL);
|
||||
var channel = gIOService.newChannelFromURI2(aURL,
|
||||
null, // aLoadingNode
|
||||
Services.scriptSecurityManager.getSystemPrincipal(),
|
||||
null, // aTriggeringPrincipal
|
||||
CI.nsILoadInfo.SEC_NORMAL,
|
||||
CI.nsIContentPolicy.TYPE_OTHER);
|
||||
var inputStream = channel.open();
|
||||
if (channel instanceof Components.interfaces.nsIHttpChannel
|
||||
&& channel.responseStatus != 200) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче