Ari Heitner wrote:

> brendan,
> 
> blizzard suggested i run this by you:
> 
> i need to enable UniversalXPConnect to glue some magic objects together before
> i load untrusted JS. then i need to disable this (so that the untrusted JS
> doesn't do anything it's not allowed; it's in a very strict sandbox). and i
> need to do it all from an embedding application.
> 
> i'm sure there's a straightforward way to do it. any point to docs/example/code
> to read would be appreciated.

Enabling and disabling a capability requires using 
nsIScriptSecurityManager (caps/idl/nsIScriptSecurityManager.idl, which 
contains horrid tabs and InterCaps method names rather than interCaps -- 
mstoltz, I'm whining at you).

XPCOM's service manager lets you get a service, so I think you're done.  
Cc'ing mstoltz and jband for their better-informed responses.

/be


Reply via email to