mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 960694. Support writing out classes with JS implementations of classinfo. r=bsmedberg
--HG-- extra : rebase_source : 6eb91d99f710b366fc2ffab5defea0969834633f
This commit is contained in:
parent
f9b09db3f5
commit
72bc953afd
@ -261,9 +261,21 @@ nsBinaryOutputStream::WriteCompoundObject(nsISupports* aObject,
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
nsCID cid;
|
||||
classInfo->GetClassIDNoAlloc(&cid);
|
||||
nsresult rv = classInfo->GetClassIDNoAlloc(&cid);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = WriteID(cid);
|
||||
} else {
|
||||
nsCID *cidptr = nullptr;
|
||||
rv = classInfo->GetClassID(&cidptr);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
rv = WriteID(*cidptr);
|
||||
|
||||
NS_Free(cidptr);
|
||||
}
|
||||
|
||||
nsresult rv = WriteID(cid);
|
||||
if (NS_WARN_IF(NS_FAILED(rv)))
|
||||
return rv;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user