Backed out changeset 17ca97e65aa5 (bug 940727)

This commit is contained in:
Ed Morley 2013-11-20 16:37:55 +00:00
parent 99a1af352f
commit 58ac75dfe2
3 changed files with 1 additions and 21 deletions

View File

@ -80,10 +80,7 @@ DOMProxyHandler::GetAndClearExpandoObject(JSObject* obj)
if (v.isObject()) {
js::SetProxyExtra(obj, JSPROXYSLOT_EXPANDO, UndefinedValue());
XPCWrappedNativeScope* scope = xpc::MaybeGetObjectScope(obj);
if (scope) {
scope->RemoveDOMExpandoObject(obj);
}
xpc::GetObjectScope(obj)->RemoveDOMExpandoObject(obj);
} else {
js::ExpandoAndGeneration* expandoAndGeneration =
static_cast<js::ExpandoAndGeneration*>(v.toPrivate());

View File

@ -384,20 +384,6 @@ EnsureCompartmentPrivate(JSCompartment *c)
return priv;
}
XPCWrappedNativeScope*
MaybeGetObjectScope(JSObject *obj)
{
MOZ_ASSERT(obj);
JSCompartment *compartment = js::GetObjectCompartment(obj);
MOZ_ASSERT(compartment);
CompartmentPrivate *priv = GetCompartmentPrivate(compartment);
if (!priv)
return nullptr;
return priv->scope;
}
static bool
PrincipalImmuneToScriptPolicy(nsIPrincipal* aPrincipal)
{

View File

@ -3786,9 +3786,6 @@ GetObjectScope(JSObject *obj)
return EnsureCompartmentPrivate(obj)->scope;
}
// This returns null if a scope doesn't already exist.
XPCWrappedNativeScope* MaybeGetObjectScope(JSObject *obj);
extern bool gDebugMode;
extern bool gDesiredDebugMode;