зеркало из https://github.com/mozilla/pjs.git
Fold premature entry decl initialized by gratuitous ?: expr into dependent if/else in nsFastLoadFileReader::ReadObject.
This commit is contained in:
Родитель
1ad0faa786
Коммит
45fbeb95b3
|
@ -1052,12 +1052,9 @@ nsFastLoadFileReader::ReadObject(PRBool aIsStrongRef, nsISupports* *aObject)
|
||||||
return rv;
|
return rv;
|
||||||
oid ^= MFL_OID_XOR_KEY;
|
oid ^= MFL_OID_XOR_KEY;
|
||||||
|
|
||||||
nsObjectMapEntry* entry = (oid != MFL_DULL_OBJECT_OID)
|
|
||||||
? &mFooter.GetSharpObjectEntry(oid)
|
|
||||||
: nsnull;
|
|
||||||
nsCOMPtr<nsISupports> object;
|
nsCOMPtr<nsISupports> object;
|
||||||
|
|
||||||
if (!entry) {
|
if (oid == MFL_DULL_OBJECT_OID) {
|
||||||
// A very dull object, defined at point of single (strong) reference.
|
// A very dull object, defined at point of single (strong) reference.
|
||||||
NS_ASSERTION(aIsStrongRef, "dull object read via weak ref!");
|
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),
|
(aIsStrongRef ? 0 : MFL_WEAK_REF_TAG),
|
||||||
"strong vs. weak ref deserialization mismatch!");
|
"strong vs. weak ref deserialization mismatch!");
|
||||||
|
|
||||||
|
nsObjectMapEntry* entry = &mFooter.GetSharpObjectEntry(oid);
|
||||||
|
|
||||||
// Check whether we've already deserialized the object for this OID.
|
// Check whether we've already deserialized the object for this OID.
|
||||||
object = entry->mReadObject;
|
object = entry->mReadObject;
|
||||||
if (!object) {
|
if (!object) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче