Bug 788914 - Recompute cross-compartment wrappers when UniversalXPConnect is enabled. r=mrbkap

This commit is contained in:
Bobby Holley 2012-09-07 11:28:56 -07:00
parent c07d959563
commit 7161c1a972

View File

@ -4407,6 +4407,13 @@ inline void EnableUniversalXPConnect(JSContext *cx)
if (!priv)
return;
priv->universalXPConnectEnabled = true;
// Recompute all the cross-compartment wrappers leaving the newly-privileged
// compartment.
mozilla::DebugOnly<bool> rv;
rv = js::RecomputeWrappers(cx, js::SingleCompartment(compartment),
js::AllCompartments());
MOZ_ASSERT(rv);
}
}