From b5e276f1c53cefb83da863555fc76c5672ce84ad Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Fri, 4 Oct 2013 13:29:35 +0200 Subject: [PATCH] Bug 921454 - Skip unwrap safety assertion for cross-compartment SOWs. r=mrbkap Currently this stuff just asserts when you pass NAC across compartments. And the logic for this stuff is complicated enough that we don't gain a whole lot from duplicating it. --- js/xpconnect/wrappers/WrapperFactory.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/xpconnect/wrappers/WrapperFactory.cpp b/js/xpconnect/wrappers/WrapperFactory.cpp index 0c0ca0a2e62c..ebefcacaa48c 100644 --- a/js/xpconnect/wrappers/WrapperFactory.cpp +++ b/js/xpconnect/wrappers/WrapperFactory.cpp @@ -333,6 +333,8 @@ DEBUG_CheckUnwrapSafety(HandleObject obj, js::Wrapper *handler, } else if (WrapperFactory::IsComponentsObject(obj)) { // The Components object that is restricted regardless of origin. MOZ_ASSERT(!handler->isSafeToUnwrap()); + } else if (AccessCheck::needsSystemOnlyWrapper(obj)) { + // The rules for SOWs are complicated enough. Just skip double-checking them here. } else if (handler == &FilteringWrapper::singleton) { // We explicitly use a SecurityWrapper to protect privileged callers from // less-privileged objects that they should never see. Skip the check in