mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1186794 (part 4) - Replace nsBaseHashtable::EnumerateRead() calls in embedding/ with iterators. r=bz.
This commit is contained in:
parent
7635e073c3
commit
9855915738
@ -1806,23 +1806,35 @@ nsWebBrowserPersist::FinishSaveDocumentInternal(nsIURI* aFile,
|
||||
void nsWebBrowserPersist::Cleanup()
|
||||
{
|
||||
mURIMap.Clear();
|
||||
mOutputMap.EnumerateRead(EnumCleanupOutputMap, this);
|
||||
for (auto iter = mOutputMap.Iter(); !iter.Done(); iter.Next()) {
|
||||
nsCOMPtr<nsIChannel> channel = do_QueryInterface(iter.Key());
|
||||
if (channel) {
|
||||
channel->Cancel(NS_BINDING_ABORTED);
|
||||
}
|
||||
}
|
||||
mOutputMap.Clear();
|
||||
mUploadList.EnumerateRead(EnumCleanupUploadList, this);
|
||||
|
||||
for (auto iter = mUploadList.Iter(); !iter.Done(); iter.Next()) {
|
||||
nsCOMPtr<nsIChannel> channel = do_QueryInterface(iter.Key());
|
||||
if (channel) {
|
||||
channel->Cancel(NS_BINDING_ABORTED);
|
||||
}
|
||||
}
|
||||
mUploadList.Clear();
|
||||
|
||||
uint32_t i;
|
||||
for (i = 0; i < mDocList.Length(); i++)
|
||||
{
|
||||
for (i = 0; i < mDocList.Length(); i++) {
|
||||
DocData *docData = mDocList.ElementAt(i);
|
||||
delete docData;
|
||||
}
|
||||
mDocList.Clear();
|
||||
for (i = 0; i < mCleanupList.Length(); i++)
|
||||
{
|
||||
|
||||
for (i = 0; i < mCleanupList.Length(); i++) {
|
||||
CleanupData *cleanupData = mCleanupList.ElementAt(i);
|
||||
delete cleanupData;
|
||||
}
|
||||
mCleanupList.Clear();
|
||||
|
||||
mFilenameList.Clear();
|
||||
}
|
||||
|
||||
@ -2487,28 +2499,6 @@ nsWebBrowserPersist::EnumCalcUploadProgress(nsISupports *aKey, UploadData *aData
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
PLDHashOperator
|
||||
nsWebBrowserPersist::EnumCleanupOutputMap(nsISupports *aKey, OutputData *aData, void* aClosure)
|
||||
{
|
||||
nsCOMPtr<nsIChannel> channel = do_QueryInterface(aKey);
|
||||
if (channel)
|
||||
{
|
||||
channel->Cancel(NS_BINDING_ABORTED);
|
||||
}
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
PLDHashOperator
|
||||
nsWebBrowserPersist::EnumCleanupUploadList(nsISupports *aKey, UploadData *aData, void* aClosure)
|
||||
{
|
||||
nsCOMPtr<nsIChannel> channel = do_QueryInterface(aKey);
|
||||
if (channel)
|
||||
{
|
||||
channel->Cancel(NS_BINDING_ABORTED);
|
||||
}
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsWebBrowserPersist::StoreURI(
|
||||
const char *aURI, bool aNeedsPersisting, URIData **aData)
|
||||
|
@ -137,10 +137,6 @@ private:
|
||||
void SetApplyConversionIfNeeded(nsIChannel *aChannel);
|
||||
|
||||
// Hash table enumerators
|
||||
static PLDHashOperator EnumCleanupOutputMap(
|
||||
nsISupports *aKey, OutputData *aData, void* aClosure);
|
||||
static PLDHashOperator EnumCleanupUploadList(
|
||||
nsISupports *aKey, UploadData *aData, void* aClosure);
|
||||
static PLDHashOperator EnumCalcProgress(
|
||||
nsISupports *aKey, OutputData *aData, void* aClosure);
|
||||
static PLDHashOperator EnumCalcUploadProgress(
|
||||
|
Loading…
Reference in New Issue
Block a user