gecko-dev/js/xpconnect/wrappers
Bobby Holley 2669b93e81 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
..
AccessCheck.cpp Bug 805807 - Rearchitect filtering policies so that check() doesn't throw on denial. r=mrbkap 2012-11-02 21:47:49 -03:00
AccessCheck.h Bug 805807 - Rearchitect filtering policies so that check() doesn't throw on denial. r=mrbkap 2012-11-02 21:47:49 -03:00
ChromeObjectWrapper.cpp Bug 787856 - Convert JS_GetPrototype to support lazy protos (r=bhackett) 2012-09-03 16:42:17 -07:00
ChromeObjectWrapper.h Bug 760109 - Override traps in ChromeObjectWrapper to bounce lookups to the local prototype chain. r=mrbkap 2012-07-27 12:15:46 +02:00
FilteringWrapper.cpp Bug 805807 - Rearchitect filtering policies so that check() doesn't throw on denial. r=mrbkap 2012-11-02 21:47:49 -03:00
FilteringWrapper.h Bug 760109 - Introduce an explicit ChromeObjectWrapper. r=mrbkap 2012-07-27 12:15:46 +02:00
Makefile.in Bug 794510: Part 1 - Build with NO_NSPR_10_SUPPORT by default; r=ehsan,glandium,wtc 2012-10-11 01:00:54 -05:00
WaiveXrayWrapper.cpp Bug 771081 - part2: Rename CrossOriginWrapper files. r=gal 2012-07-16 19:22:51 +02:00
WaiveXrayWrapper.h Bug 771081 - part2: Rename CrossOriginWrapper files. r=gal 2012-07-16 19:22:51 +02:00
WrapperFactory.cpp Bug 803068 - Merge DirectWrapper and Wrapper. r=ejpbruel 2012-10-29 16:52:53 +01:00
WrapperFactory.h Bug 803068 - Merge DirectWrapper and Wrapper. r=ejpbruel 2012-10-29 16:52:53 +01:00
XrayWrapper.cpp Bug 803068 - Merge DirectWrapper and Wrapper. r=ejpbruel 2012-10-29 16:52:53 +01:00
XrayWrapper.h Bug 803068 - Merge DirectWrapper and Wrapper. r=ejpbruel 2012-10-29 16:52:53 +01:00