summaryrefslogtreecommitdiff
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.gz
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 aab1766662..69a72d0b61 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();
}