gecko/js
Bobby Holley 8b06fa3c7e 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 21:47:49 -03:00
..
ductwork/debugger 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
examples
ipc Bug 791322 - Move Rooted to js:: namespace; r=billm 2012-09-24 18:08:22 -07:00
jsd Bug 787856 - Convert JS_GetPrototype to support lazy protos (r=bhackett) 2012-09-03 16:42:17 -07:00
public Update Yarr to WebKit rev 130234 (bug 740015, r=dmandelin). 2012-11-01 21:35:25 -07:00
src Bug 805807 - Rearchitect filtering policies so that check() doesn't throw on denial. r=mrbkap 2012-11-02 21:47:49 -03:00
xpconnect Bug 805807 - Rearchitect filtering policies so that check() doesn't throw on denial. r=mrbkap 2012-11-02 21:47:49 -03:00