bug 398587: Correct prbool misuse in dom/ r=Olli.Petay a=release drivers
authortglek@mozilla.com
Mon, 12 Nov 2007 13:57:48 -0800
changeset 7872 21e54e486bb74740c2b4b08d476215a4a531e7be
parent 7871 11488fd66d326fc5406ddc311f72f72af405e184
child 7873 986fcf4d38829f46d846c833326537d24e690dfd
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersOlli.Petay, release
bugs398587
milestone1.9b2pre
bug 398587: Correct prbool misuse in dom/ r=Olli.Petay a=release drivers
dom/src/base/nsDOMClassInfo.cpp
dom/src/storage/nsDOMStorageDB.cpp
--- a/dom/src/base/nsDOMClassInfo.cpp
+++ b/dom/src/base/nsDOMClassInfo.cpp
@@ -4254,17 +4254,17 @@ nsWindowSH::GlobalScopePolluterNewResolv
     doc->ResolveName(str, nsnull, getter_AddRefs(result));
   }
 
   if (result) {
     jsval v;
     nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
     nsresult rv = WrapNative(cx, obj, result, NS_GET_IID(nsISupports), &v,
                              getter_AddRefs(holder));
-    NS_ENSURE_SUCCESS(rv, rv);
+    NS_ENSURE_SUCCESS(rv, JS_FALSE);
 
     if (!::JS_DefineUCProperty(cx, obj, ::JS_GetStringChars(jsstr),
                                ::JS_GetStringLength(jsstr), v, nsnull, nsnull,
                                0)) {
       nsDOMClassInfo::ThrowJSException(cx, NS_ERROR_UNEXPECTED);
 
       return JS_FALSE;
     }
--- a/dom/src/storage/nsDOMStorageDB.cpp
+++ b/dom/src/storage/nsDOMStorageDB.cpp
@@ -248,17 +248,17 @@ nsDOMStorageDB::GetKeyValue(const nsAStr
 
     rv = mGetKeyValueStatement->GetString(2, aOwner);
     NS_ENSURE_SUCCESS(rv, rv);
   }
   else {
     rv = NS_ERROR_DOM_NOT_FOUND_ERR;
   }
 
-  *aSecure = (PRBool)secureInt;
+  *aSecure = !!secureInt;
 
   return rv;
 }
 
 nsresult
 nsDOMStorageDB::SetKey(const nsAString& aDomain,
                        const nsAString& aKey,
                        const nsAString& aValue,