зеркало из https://github.com/mozilla/gecko-dev.git
Fixed a reference counting bug and a problem with the NS_RELEASE() macro.
This commit is contained in:
Родитель
4541604e38
Коммит
ea903107e6
|
@ -438,13 +438,15 @@ RDFXMLDataSourceImpl::~RDFXMLDataSourceImpl(void)
|
|||
|
||||
Flush();
|
||||
|
||||
while (--mNumNamedDataSourceURIs >= 0)
|
||||
while (mNumNamedDataSourceURIs-- > 0) {
|
||||
delete mNamedDataSourceURIs[mNumNamedDataSourceURIs];
|
||||
}
|
||||
|
||||
delete mNamedDataSourceURIs;
|
||||
|
||||
while (--mNumCSSStyleSheetURLs >= 0)
|
||||
while (mNumCSSStyleSheetURLs-- > 0) {
|
||||
NS_RELEASE(mCSSStyleSheetURLs[mNumCSSStyleSheetURLs]);
|
||||
}
|
||||
|
||||
delete mCSSStyleSheetURLs;
|
||||
|
||||
|
@ -699,6 +701,8 @@ RDFXMLDataSourceImpl::Flush(void)
|
|||
if (! out)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF(out);
|
||||
|
||||
if (NS_FAILED(rv = Serialize(out)))
|
||||
goto done;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче