Back out 252703 due to Txul / Ts regression.

git-svn-id: svn://10.0.0.236/trunk@166118 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%dbaron.org
2004-12-02 01:26:20 +00:00
parent ecc7a81d50
commit 4bbdb86a7a
21 changed files with 192 additions and 295 deletions

View File

@@ -2140,10 +2140,8 @@ nsFastLoadFileWriter::WriteObjectCommon(nsISupports* aObject,
// updating after reading.
oid |= MFL_OBJECT_DEF_TAG;
classInfo = do_QueryInterface(aObject);
if (!classInfo) {
NS_NOTREACHED("aObject must implement nsIClassInfo");
if (!classInfo)
return NS_ERROR_FAILURE;
}
PRUint32 flags;
if (NS_SUCCEEDED(classInfo->GetFlags(&flags)) &&
@@ -2177,10 +2175,8 @@ nsFastLoadFileWriter::WriteObjectCommon(nsISupports* aObject,
if (oid & MFL_OBJECT_DEF_TAG) {
nsCOMPtr<nsISerializable> serializable(do_QueryInterface(aObject));
if (!serializable) {
NS_NOTREACHED("aObject must implement nsISerializable");
if (!serializable)
return NS_ERROR_FAILURE;
}
nsCID slowCID;
rv = classInfo->GetClassIDNoAlloc(&slowCID);
@@ -2237,15 +2233,13 @@ nsFastLoadFileWriter::WriteCompoundObject(nsISupports* aObject,
{
nsresult rv;
nsCOMPtr<nsISupports> rootObject(do_QueryInterface(aObject));
// We could assert that |rootObject != aObject|, but that would prevent
// callers who don't know whether they're dealing with the primary
// nsISupports pointer (e.g., they don't know which implementation of
// nsIURI they have) from using this function.
#ifdef NS_DEBUG
nsCOMPtr<nsISupports> roundtrip;
rootObject->QueryInterface(aIID, getter_AddRefs(roundtrip));
NS_ASSERTION(rootObject.get() != aObject,
"wasteful call to WriteCompoundObject -- call WriteObject!");
NS_ASSERTION(roundtrip.get() == aObject,
"bad aggregation or multiple inheritance detected by call to "
"WriteCompoundObject!");