Fold premature entry decl initialized by gratuitous ?: expr into dependent if/else in nsFastLoadFileReader::ReadObject.

This commit is contained in:
brendan%mozilla.org 2003-06-04 06:08:15 +00:00
parent 088235deed
commit 32fe82e60e

View File

@ -1052,12 +1052,9 @@ nsFastLoadFileReader::ReadObject(PRBool aIsStrongRef, nsISupports* *aObject)
return rv;
oid ^= MFL_OID_XOR_KEY;
nsObjectMapEntry* entry = (oid != MFL_DULL_OBJECT_OID)
? &mFooter.GetSharpObjectEntry(oid)
: nsnull;
nsCOMPtr<nsISupports> object;
if (!entry) {
if (oid == MFL_DULL_OBJECT_OID) {
// A very dull object, defined at point of single (strong) reference.
NS_ASSERTION(aIsStrongRef, "dull object read via weak ref!");
@ -1069,6 +1066,8 @@ nsFastLoadFileReader::ReadObject(PRBool aIsStrongRef, nsISupports* *aObject)
(aIsStrongRef ? 0 : MFL_WEAK_REF_TAG),
"strong vs. weak ref deserialization mismatch!");
nsObjectMapEntry* entry = &mFooter.GetSharpObjectEntry(oid);
// Check whether we've already deserialized the object for this OID.
object = entry->mReadObject;
if (!object) {