Bug 533636. Speed up IsSecurityWrapper. r=mrbkap

This commit is contained in:
Boris Zbarsky 2009-12-11 22:36:35 -08:00
parent a6e863f1da
commit 8c7d101795

View File

@ -221,10 +221,8 @@ public:
static JSBool IsSecurityWrapper(JSObject *wrapper)
{
JSClass *clasp = STOBJ_GET_CLASS(wrapper);
return clasp == &sXPC_COW_JSClass.base ||
clasp == &sXPC_SJOW_JSClass.base ||
clasp == &sXPC_SOW_JSClass.base ||
clasp == &sXPC_XOW_JSClass.base;
return (clasp->flags & JSCLASS_IS_EXTENDED) &&
((JSExtendedClass*)clasp)->wrappedObject;
}
/**