FF17 getSimpleCodebasePrincipal name change
This commit is contained in:
parent
f69e0dca53
commit
fc3efa9b16
@ -235,6 +235,7 @@ ChromeActions.prototype = {
|
|||||||
var domWindow = this.domWindow;
|
var domWindow = this.domWindow;
|
||||||
this.dataListener.onprogress =
|
this.dataListener.onprogress =
|
||||||
function ChromeActions_dataListenerProgress(loaded, total) {
|
function ChromeActions_dataListenerProgress(loaded, total) {
|
||||||
|
|
||||||
domWindow.postMessage({
|
domWindow.postMessage({
|
||||||
pdfjsLoadAction: 'progress',
|
pdfjsLoadAction: 'progress',
|
||||||
loaded: loaded,
|
loaded: loaded,
|
||||||
@ -478,7 +479,10 @@ PdfStreamConverter.prototype = {
|
|||||||
var securityManager = Cc['@mozilla.org/scriptsecuritymanager;1']
|
var securityManager = Cc['@mozilla.org/scriptsecuritymanager;1']
|
||||||
.getService(Ci.nsIScriptSecurityManager);
|
.getService(Ci.nsIScriptSecurityManager);
|
||||||
var uri = ioService.newURI(PDF_VIEWER_WEB_PAGE, null, null);
|
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;
|
channel.owner = resourcePrincipal;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user