Bug 965898 - Drop support for XPCWN XOWs. r=gabor

XOWs only allow access to Window and Location, both of which are on WebIDL now.
This commit is contained in:
Bobby Holley 2014-07-30 12:23:01 -07:00
parent 9345effa61
commit 059da04f08
2 changed files with 5 additions and 11 deletions

View File

@ -170,18 +170,15 @@ FilteringWrapper<Base, Policy>::enter(JSContext *cx, HandleObject wrapper,
return true;
}
#define XOW FilteringWrapper<SecurityXrayXPCWN, CrossOriginAccessiblePropertiesOnly>
#define DXOW FilteringWrapper<SecurityXrayDOM, CrossOriginAccessiblePropertiesOnly>
#define XOW FilteringWrapper<SecurityXrayDOM, CrossOriginAccessiblePropertiesOnly>
#define NNXOW FilteringWrapper<CrossCompartmentSecurityWrapper, Opaque>
#define NNXOWC FilteringWrapper<CrossCompartmentSecurityWrapper, OpaqueWithCall>
template<> const XOW XOW::singleton(0);
template<> const DXOW DXOW::singleton(0);
template<> const NNXOW NNXOW::singleton(0);
template<> const NNXOWC NNXOWC::singleton(0);
template class XOW;
template class DXOW;
template class NNXOW;
template class NNXOWC;
template class ChromeObjectWrapperBase;

View File

@ -397,21 +397,18 @@ SelectWrapper(bool securityWrapper, bool wantXrays, XrayType xrayType,
}
// This is a security wrapper. Use the security versions and filter.
if (xrayType == XrayForWrappedNative)
return &FilteringWrapper<SecurityXrayXPCWN,
CrossOriginAccessiblePropertiesOnly>::singleton;
else if (xrayType == XrayForDOMObject)
if (xrayType == XrayForDOMObject)
return &FilteringWrapper<SecurityXrayDOM,
CrossOriginAccessiblePropertiesOnly>::singleton;
// There's never any reason to expose pure JS objects to non-subsuming actors.
// Just use an opaque wrapper in this case.
// There's never any reason to expose other objects to non-subsuming actors.
// Just use an opaque wrapper in these cases.
//
// In general, we don't want opaque function wrappers to be callable.
// But in the case of XBL, we rely on content being able to invoke
// functions exposed from the XBL scope. We could remove this exception,
// if needed, by using ExportFunction to generate the content-side
// representations of XBL methods.
MOZ_ASSERT(xrayType == XrayForJSObject || xrayType == XrayForOpaqueObject);
if (originIsXBLScope)
return &FilteringWrapper<CrossCompartmentSecurityWrapper, OpaqueWithCall>::singleton;
return &FilteringWrapper<CrossCompartmentSecurityWrapper, Opaque>::singleton;