Bug 821850 - Properly propagate |strict| in JSObject::deleteByValue. r=jorendorff
Bug 821850 - Don't rewrap |this| in nativeCall. r=jorendorff

This generally works with membrane semantics, but breaks when same-compartment
security wrappers are involved. In particular, when Field{Getter,Setter} live
in the XBL scope and operate on NAC via nativeCall, the this object can't be
rewrapped, because otherwise a SOW will appear and break everything.

It's not ideal to hardcode the index of |this|, but there's not really a great
alternative. IIUC the layout isn't changing any time soon, and this code will
hopefully be short-lived anyway, since SCSWs are on their way out.
Bug 821850 - Make XBL-in-content tests Xray-safe. r=bz

We use XPCNativeWrapper.unwrap rather than .wrappedJSObject so that the tests
are agnostic to whether there's an Xray wrapper or not.

I converted test_tree_column_reorder.xul into a chrome test because it does
all sorts of crazy introspection on the binding, and it really should be
a chrome test anyway.
Bug 821850 - Add infrastructure for lazily-created XBL scopes. r=bz
Bug 821850 - Check for XBL scopes in nsContentUtils::IsCallerXBL(). r=bz
Bug 821850 - Clean up security wrappers for NAC. r=bz
Bug 821850 - Let nsExpandedPrincipal through CheckFunctionAccess. r=bz

Otherwise the whole method borks when it discovers that the principal doesn't
have a URI.
Bug 821850 - Pass nsXBLBinding instead of nsIContent during implementation installation. r=bz

This lets us hook up the binding to the JSClass.
Bug 821850 - Remove bogus comment/check and replace with an assert. r=bz

This confused me, because fields are, in fact, exposed via the prototype
via the complicated two-step solution defined in InstallField. As it turns
out, CompilePrototypeMembers throws if mClassObject ends up null.
Bug 821850 - Make DoInitJSClass unconditionally fill in aClassObject. r=bz

Right now, DoInitJSClass only returns non-null if the class object is new
(and thus needs to have members installed on it). The code then goes and
unconditionally tries to install the members, null-checking and aborting
each time.

Instead, let's use an explicit boolean and one early return. This lets us
get a reference to our JSClass no matter what, which we need.
Bug 821850 - Store a strong ref to the JSClass in nsXBLBinding. r=bz
Bug 821850 - Remove unused arguments from InstallMember and simplify calling convention. r=bz

Let's just pass a JSContext and do Requests/Compartments in the caller.
Bug 821850 - Hoist Field machinery into nsXBLProtoImplField. r=bz

This is a pure cut/paste except for removing |static| from XBLResolve.
XBLResolve will go away soon, so there's no need to put it in a header.
Bug 821850 - Install XBL field accessors on prototype objects at setup time, and nuke XBLResolve. r=bz
Bug 821850 - Unwrap |callee| before passing it to InstallXBLField. r=bz

InstallXBLField knows how to handle cross-compartment |callee|. However,
The current value will always be wrapped. We need to unwrap said wrappers,
otherwise we'll end up with objects that aren't functions.
Bug 821850 - Make XBL prototype setup tamper-proof for Xrays. r=bz

We make the class object readonly/non-configurable, as well as all the properties
and methods on the class object.
Bug 821850 - Add API to lookup implementation members on XBL bindings. r=bz
Bug 821850 - Expose XBL members via Xray wrappers. r=bz
Bug 821850 - Dynamically waive Xray for field access by XBL script on bound nodes. r=bz
Bug 821850 - Clone XBL into the XBL scope's compartment. r=bz