FF17 getSimpleCodebasePrincipal name change

This commit is contained in:
Yury Delendik 2012-08-01 16:39:51 -05:00
parent f69e0dca53
commit fc3efa9b16

View File

@ -235,6 +235,7 @@ ChromeActions.prototype = {
var domWindow = this.domWindow;
this.dataListener.onprogress =
function ChromeActions_dataListenerProgress(loaded, total) {
domWindow.postMessage({
pdfjsLoadAction: 'progress',
loaded: loaded,
@ -478,7 +479,10 @@ PdfStreamConverter.prototype = {
var securityManager = Cc['@mozilla.org/scriptsecuritymanager;1']
.getService(Ci.nsIScriptSecurityManager);
var uri = ioService.newURI(PDF_VIEWER_WEB_PAGE, null, null);
var resourcePrincipal = securityManager.getCodebasePrincipal(uri);
// FF16 and below had getCodebasePrincipal (bug 774585)
var resourcePrincipal = 'getSimpleCodebasePrincipal' in securityManager ?
securityManager.getSimpleCodebasePrincipal(uri) :
securityManager.getCodebasePrincipal(uri);
channel.owner = resourcePrincipal;
}
},