Bug 1474540 - Assert we don't pass cross-compartment wrappers to AutoJSAPI::Init. r=bholley

This commit is contained in:
Jan de Mooij
2018-07-24 09:19:25 +02:00
parent f26d48ae39
commit 41e091b454
3 changed files with 7 additions and 1 deletions

View File

@@ -490,6 +490,7 @@ AutoJSAPI::Init(nsIGlobalObject* aGlobalObject)
bool
AutoJSAPI::Init(JSObject* aObject)
{
MOZ_ASSERT(!js::IsCrossCompartmentWrapper(aObject));
return Init(xpc::NativeGlobal(aObject));
}