diff --git a/xpcom/io/nsFastLoadFile.cpp b/xpcom/io/nsFastLoadFile.cpp index 3e84fa12ba5..aed2bf1bfec 100644 --- a/xpcom/io/nsFastLoadFile.cpp +++ b/xpcom/io/nsFastLoadFile.cpp @@ -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 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) {