bug 453892: fix prbool bugs in xpconnect. r=jorendorff
--- a/js/src/xpconnect/src/xpcprivate.h
+++ b/js/src/xpconnect/src/xpcprivate.h
@@ -1891,17 +1891,17 @@ public:
GetSecurityInfoAddr() {return &mSecurityInfo;}
JSUint32
GetClassInfoFlags() const {return mClassInfoFlags;}
#ifdef GET_IT
#undef GET_IT
#endif
-#define GET_IT(f_) const {return (JSBool)(mClassInfoFlags & nsIClassInfo:: f_ );}
+#define GET_IT(f_) const {return !!(mClassInfoFlags & nsIClassInfo:: f_ );}
JSBool ClassIsSingleton() GET_IT(SINGLETON)
JSBool ClassIsThreadSafe() GET_IT(THREADSAFE)
JSBool ClassIsMainThreadOnly() GET_IT(MAIN_THREAD_ONLY)
JSBool ClassIsDOMObject() GET_IT(DOM_OBJECT)
JSBool ClassIsPluginObject() GET_IT(PLUGIN_OBJECT)
#undef GET_IT
--- a/js/src/xpconnect/src/xpcwrappednative.cpp
+++ b/js/src/xpconnect/src/xpcwrappednative.cpp
@@ -2887,17 +2887,17 @@ XPCWrappedNative::HandlePossibleNameCase
nsCRT::IsUpper((char)oldStr[0]) &&
nsnull != (newStr = nsCRT::strdup(oldStr)))
{
newStr[0] = (PRUnichar) nsCRT::ToLower((char)newStr[0]);
newJSStr = JS_NewUCStringCopyZ(ccx, (const jschar*)newStr);
nsCRT::free(newStr);
if(newJSStr && (set ?
set->FindMember(STRING_TO_JSVAL(newJSStr), &member, &localIface) :
- (JSBool)NS_PTR_TO_INT32(iface->FindMember(STRING_TO_JSVAL(newJSStr)))))
+ NS_PTR_TO_INT32(iface->FindMember(STRING_TO_JSVAL(newJSStr)))))
{
// found it!
const char* ifaceName = set ?
localIface->GetNameString() :
iface->GetNameString();
const char* goodName = JS_GetStringBytes(newJSStr);
const char* badName = JS_GetStringBytes(oldJSStr);
char* locationStr = nsnull;