Boris Zbarsky wrote:
> Michael Vincent van Rantwijk, MultiZilla wrote:
>> but I'm not sure how I should load my replacement without giving the 
>> page chrome privileges...
> 
> See what nsAboutRedirector::NewChannel does in terms of calling 
> SetOwner() on the channel.
> 
> -Boris

Yeah, I already looked at it, and I think that this JS equivalent is 
what it does (hopefully) right?

const Cc = Components.classes;
const Ci = Components.interfaces;
var secMan = 
Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager);
channel.owner = secMan.getCodebasePrincipal(aURI);

Thanks,

-- 
Michael Vincent van Rantwijk
- MultiZilla Project Team Lead
- XUL Boot Camp Staff member (ActiveState Training Partner)
- iPhone Application Developer

_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to