mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-29 15:47:57 +02:00
Merge pull request #2193 from brendandahl/princpal
Change how we get the resource principal.
This commit is contained in:
commit
72e4c069b2
1 changed files with 4 additions and 3 deletions
|
@ -536,9 +536,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);
|
||||||
// FF16 and below had getCodebasePrincipal (bug 774585)
|
// FF16 and below had getCodebasePrincipal, it was replaced by
|
||||||
var resourcePrincipal = 'getSimpleCodebasePrincipal' in securityManager ?
|
// getNoAppCodebasePrincipal (bug 758258).
|
||||||
securityManager.getSimpleCodebasePrincipal(uri) :
|
var resourcePrincipal = 'getNoAppCodebasePrincipal' in securityManager ?
|
||||||
|
securityManager.getNoAppCodebasePrincipal(uri) :
|
||||||
securityManager.getCodebasePrincipal(uri);
|
securityManager.getCodebasePrincipal(uri);
|
||||||
channel.owner = resourcePrincipal;
|
channel.owner = resourcePrincipal;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue