summaryrefslogtreecommitdiffstats
path: root/dom/cache
diff options
context:
space:
mode:
authorYaron Tausky <ytausky@mozilla.com>2020-01-09 22:23:13 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-01-09 22:23:13 +0100
commit51b1cd97aa1c9204d22535038ad1463d89f93232 (patch)
treed0e81ba498e613ce291f138f62338ba584538805 /dom/cache
parent8198126c39ff8752972c32bb877af5df5fb05c8e (diff)
downloadUXP-51b1cd97aa1c9204d22535038ad1463d89f93232.tar
UXP-51b1cd97aa1c9204d22535038ad1463d89f93232.tar.gz
UXP-51b1cd97aa1c9204d22535038ad1463d89f93232.tar.lz
UXP-51b1cd97aa1c9204d22535038ad1463d89f93232.tar.xz
UXP-51b1cd97aa1c9204d22535038ad1463d89f93232.zip
Make copy of list before iterating over it.
Diffstat (limited to 'dom/cache')
-rw-r--r--dom/cache/StreamControl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/dom/cache/StreamControl.cpp b/dom/cache/StreamControl.cpp
index aab176666..69a72d0b6 100644
--- a/dom/cache/StreamControl.cpp
+++ b/dom/cache/StreamControl.cpp
@@ -68,7 +68,8 @@ StreamControl::CloseAllReadStreams()
{
AssertOwningThread();
- ReadStreamList::ForwardIterator iter(mReadStreamList);
+ auto readStreamList = mReadStreamList;
+ ReadStreamList::ForwardIterator iter(readStreamList);
while (iter.HasMore()) {
iter.GetNext()->CloseStream();
}