From 059da04f08830f8208ad3dcc97ae2f4da72754cc Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Wed, 30 Jul 2014 12:23:01 -0700 Subject: [PATCH] Bug 965898 - Drop support for XPCWN XOWs. r=gabor XOWs only allow access to Window and Location, both of which are on WebIDL now. --- js/xpconnect/wrappers/FilteringWrapper.cpp | 5 +---- js/xpconnect/wrappers/WrapperFactory.cpp | 11 ++++------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/js/xpconnect/wrappers/FilteringWrapper.cpp b/js/xpconnect/wrappers/FilteringWrapper.cpp index 5be2a9957f4..d9cd382abb8 100644 --- a/js/xpconnect/wrappers/FilteringWrapper.cpp +++ b/js/xpconnect/wrappers/FilteringWrapper.cpp @@ -170,18 +170,15 @@ FilteringWrapper::enter(JSContext *cx, HandleObject wrapper, return true; } -#define XOW FilteringWrapper -#define DXOW FilteringWrapper +#define XOW FilteringWrapper #define NNXOW FilteringWrapper #define NNXOWC FilteringWrapper 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; diff --git a/js/xpconnect/wrappers/WrapperFactory.cpp b/js/xpconnect/wrappers/WrapperFactory.cpp index 6f4c2697c25..5b4da67f7c1 100644 --- a/js/xpconnect/wrappers/WrapperFactory.cpp +++ b/js/xpconnect/wrappers/WrapperFactory.cpp @@ -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::singleton; - else if (xrayType == XrayForDOMObject) + if (xrayType == XrayForDOMObject) return &FilteringWrapper::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::singleton; return &FilteringWrapper::singleton;