Bug 960828 - Diagnostics. r=mccr8

This commit is contained in:
Bobby Holley 2014-02-13 11:54:59 -08:00
parent 21e7995fb4
commit 7cbea2a19d

View File

@ -377,6 +377,13 @@ XPCWrappedNative::GetNewOrUsed(xpcObjectHelper& helper,
if (parent != plannedParent) {
XPCWrappedNativeScope* betterScope = GetObjectScope(parent);
if (MOZ_UNLIKELY(!betterScope)) {
printf("Uh oh, hit an object without a scope! Crashing shortly.\n");
printf("Object class: %s\n", js::GetObjectClass(parent)->name);
printf("Global class: %s\n", js::GetObjectClass(js::GetGlobalForObjectCrossCompartment(parent))->name);
printf("IsMainThread: %u\n", (uint32_t) NS_IsMainThread());
MOZ_CRASH();
}
if (betterScope != Scope)
return GetNewOrUsed(helper, betterScope, Interface, resultWrapper);