874
edits
(added {{draft}} to header) |
(removed __callableByContent__ property, since we're not enforcing it anymore) |
||
| Line 29: | Line 29: | ||
/* Do something here that requires chrome privileges. */ | /* Do something here that requires chrome privileges. */ | ||
} | } | ||
var sandbox = Cu.Sandbox("http://www.mozilla.org"); | var sandbox = Cu.Sandbox("http://www.mozilla.org"); | ||
| Line 37: | Line 36: | ||
In the above example, <tt>foo()</tt> is wrapped by a COW when accessed by sandboxed code executed via <tt>Components.utils.evalInSandbox()</tt>. The object <tt>{bar: 5}</tt> is wrapped in an <tt>XPCSafeJSObjectWrapper</tt> before being passed into <tt>foo()</tt>. | In the above example, <tt>foo()</tt> is wrapped by a COW when accessed by sandboxed code executed via <tt>Components.utils.evalInSandbox()</tt>. The object <tt>{bar: 5}</tt> is wrapped in an <tt>XPCSafeJSObjectWrapper</tt> before being passed into <tt>foo()</tt>. | ||
=== COWing Objects === | === COWing Objects === | ||
edits