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.
This commit is contained in:
Bobby Holley 2013-10-04 13:29:35 +02:00
Родитель 169c6eab28
Коммит b5e276f1c5
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -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<CrossCompartmentSecurityWrapper, GentlyOpaque>::singleton) {
// We explicitly use a SecurityWrapper to protect privileged callers from
// less-privileged objects that they should never see. Skip the check in