Merge pull request #1137 from lv7777/fix-#1115
Migrate to newChannel2. This is to suppress deprecation warnings: Warning: 'nsIOService::NewChannel()' deprecated, please use 'nsIOService::NewChannel2()' Warning: 'nsIAboutModule->newChannel(aURI)' deprecated, please use 'nsIAboutModule->newChannel(aURI, aLoadInfo)'
This commit is contained in:
commit
7c88cd0ab5
@ -47,7 +47,23 @@ AboutGroup.prototype = {
|
|||||||
|
|
||||||
newChannel : function(aURI)
|
newChannel : function(aURI)
|
||||||
{
|
{
|
||||||
|
const version = Services.appinfo.platformVersion;
|
||||||
|
|
||||||
|
const comp = Services.vc.compare('48.*',version);
|
||||||
|
if( comp > 0 ){
|
||||||
return Services.io.newChannel('chrome://treestyletab/content/group.xul', null, null);
|
return Services.io.newChannel('chrome://treestyletab/content/group.xul', null, null);
|
||||||
|
}else{
|
||||||
|
return Services.io.newChannel2(
|
||||||
|
'chrome://treestyletab/content/group.xul',
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
|
Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
|
Components.interfaces.nsILoadInfo.SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED,
|
||||||
|
Components.interfaces.nsIContentPolicy.TYPE_OTHER
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getURIFlags : function(aURI)
|
getURIFlags : function(aURI)
|
||||||
|
Loading…
Reference in New Issue
Block a user