From 0ae924684583fb96bced7a3e5cda473260d28a20 Mon Sep 17 00:00:00 2001 From: "timeless@mozdev.org" Date: Mon, 26 Oct 2009 18:39:24 -0700 Subject: [PATCH] Bug 514073 - [@ XPCIDispatchExtension::Enumerate], r=mrbkap --- js/src/xpconnect/src/XPCIDispatchExtension.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/src/xpconnect/src/XPCIDispatchExtension.cpp b/js/src/xpconnect/src/XPCIDispatchExtension.cpp index 1cfa1e51451..22d5d294bf9 100644 --- a/js/src/xpconnect/src/XPCIDispatchExtension.cpp +++ b/js/src/xpconnect/src/XPCIDispatchExtension.cpp @@ -130,7 +130,11 @@ JSBool XPCIDispatchExtension::Enumerate(XPCCallContext& ccx, JSObject* obj, if(!tearoff) return JS_FALSE; + if(!tearoff->IsIDispatch()) + return JS_FALSE; + XPCDispInterface* pInfo = tearoff->GetIDispatchInfo(); + PRUint32 members = pInfo->GetMemberCount(); // Iterate over the members and force the properties to be resolved for(PRUint32 index = 0; index < members; ++index)