Bug 1165272 - Part 3: replace getCodebasePrincipal. r=bholley

This commit is contained in:
Yoshi Huang 2015-08-18 15:33:22 +08:00
parent de4b8a9d76
commit af4352b2c2
2 changed files with 4 additions and 4 deletions

View File

@ -32,9 +32,9 @@ let principaluri = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService).
newURI(PSEUDOURI, null, null);
let principal = Cc["@mozilla.org/scriptsecuritymanager;1"].
getService(Ci.nsIScriptSecurityManager).
getCodebasePrincipal(principaluri);
let ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
.getService(Ci.nsIScriptSecurityManager);
let principal = ssm.createCodebasePrincipal(principaluri, {});
function toArray(args) {
return Array.prototype.slice.call(args);

View File

@ -1324,7 +1324,7 @@ let indexedDBHelpers = {
principal = Services.scriptSecurityManager.getSystemPrincipal();
} else {
let uri = Services.io.newURI(host, null, null);
principal = Services.scriptSecurityManager.getCodebasePrincipal(uri);
principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
}
return require("indexedDB").openForPrincipal(principal, name);