Bug 658909 - Remove GWNOJO from MarkWrappedNative. r=mrbkap

This commit is contained in:
Bobby Holley 2013-03-21 08:20:43 -07:00
parent a39e82c6c7
commit 11b5031023

View File

@ -664,19 +664,17 @@ MarkWrappedNative(JSTracer *trc, JSObject *obj)
if (clazz->flags & JSCLASS_DOM_GLOBAL) { if (clazz->flags & JSCLASS_DOM_GLOBAL) {
mozilla::dom::TraceProtoAndIfaceCache(trc, obj); mozilla::dom::TraceProtoAndIfaceCache(trc, obj);
} }
MOZ_ASSERT(IS_WRAPPER_CLASS(clazz));
JSObject *obj2; if (IS_WN_WRAPPER_OBJECT(obj)) {
XPCWrappedNative *wrapper = XPCWrappedNative::Get(obj);
// Pass null for the first JSContext* parameter to skip any security if (wrapper) {
// checks and to avoid potential state change there. if (wrapper->IsValid())
XPCWrappedNative* wrapper = wrapper->TraceInside(trc);
XPCWrappedNative::GetWrappedNativeOfJSObject(nullptr, obj, nullptr, &obj2); }
} else {
if (wrapper) { MOZ_ASSERT(IS_SLIM_WRAPPER_OBJECT(obj));
if (wrapper->IsValid()) TraceInsideSlimWrapper(trc, obj);
wrapper->TraceInside(trc);
} else if (obj2) {
TraceInsideSlimWrapper(trc, obj2);
} }
} }