Bug 918595 - Close all cached file descriptors on TabChild shutdown, r=jduell.

This commit is contained in:
Ben Turner 2014-05-07 12:03:48 -07:00
parent f1e6cfb5b1
commit 1f47c8c842

View File

@ -1331,6 +1331,22 @@ TabChild::DestroyWindow()
}
mLayersId = 0;
}
for (uint32_t index = 0, count = mCachedFileDescriptorInfos.Length();
index < count;
index++) {
nsAutoPtr<CachedFileDescriptorInfo>& info =
mCachedFileDescriptorInfos[index];
MOZ_ASSERT(!info->mCallback);
MOZ_ASSERT(!info->mCanceled);
if (info->mFileDescriptor.IsValid()) {
nsRefPtr<CloseFileRunnable> runnable =
new CloseFileRunnable(info->mFileDescriptor);
runnable->Dispatch();
}
}
}
bool