diff --git a/js/xpconnect/src/XPCConvert.cpp b/js/xpconnect/src/XPCConvert.cpp index 40d7ada63cb21..c1c4f4ae4a2f4 100644 --- a/js/xpconnect/src/XPCConvert.cpp +++ b/js/xpconnect/src/XPCConvert.cpp @@ -53,9 +53,7 @@ using namespace JS; // static bool XPCConvert::GetISupportsFromJSObject(JSObject* obj, nsISupports** iface) { - const JSClass* jsclass = JS::GetClass(obj); - MOZ_ASSERT(jsclass, "obj has no class"); - if (jsclass && jsclass->slot0IsISupports()) { + if (JS::GetClass(obj)->slot0IsISupports()) { *iface = JS::GetObjectISupports(obj); return true; }