gecko/js/xpconnect
Bobby Holley 2d408f61a6 Bug 805807 - Rearchitect filtering policies so that check() doesn't throw on denial. r=mrbkap
This is another one of those annoying situaitons in XPConnect right now where we
can't ask a question without potentially throwing if the answer is no. There's
also a bunch of unused cruft in here (like the Perm*Access stuff), so this stuff
was ripe for a spring cleaning. Unfortunately, I wasn't able to divide this patch
up nicely. Sorry for the big diff. :-(

In a nutshell, this patch changes things so that Policy::check() just becomes
a predicate that says whether the access is allowed or not. There's the remote
possibility that one of the underlying JSAPI calls in a ::check() implementation
might throw, so callers to ::check() should check JS_IsExceptionPending
afterwards (this doesn't catch OOM, but we can just continue along until the
next OOM-triggering operation and throw there).

Aside from exceptional cases, callers should call Policy::deny if they want to
report the failure. Policy::deny returns success value that should be returned
to the wrapper's consumer.
2012-11-02 13:27:59 +01:00
..
crashtests Bug 797583 - Remove bogus assertion. r=mrbkap 2012-10-04 11:56:51 +02:00
idl Backed out 2 changesets (bug 579517) 2012-10-25 12:32:24 -04:00
loader Bug 798491: Add an option to stick all chrome JSMs/JS components in the same compartment. r=mrbkap,philikon 2012-10-31 09:13:28 -07:00
public Bug 798123 - Fix build bustage. r=Waldo 2012-10-18 22:21:38 -04:00
shell Bug 806587: Restore getCodebasePrincipal since extensions use it. r=mounir 2012-10-30 22:24:41 +01:00
src Bug 806283 - Split up and add native iterators to "object/misc" memory reports. r=jorendorff. 2012-11-01 16:51:04 -07:00
tests Bug 805807 - Make Components wrapper throw on denial. r=mrbkap 2012-11-02 13:27:59 +01:00
wrappers Bug 805807 - Rearchitect filtering policies so that check() doesn't throw on denial. r=mrbkap 2012-11-02 13:27:59 +01:00
Makefile.in