summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaron Tausky <ytausky@mozilla.com>2020-01-09 22:23:13 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-01-11 13:46:03 +0100
commitd62795c868dff9a12a8868d09b3331cb8c4ad39b (patch)
treee7d4ac83bdbfee3f3d0f57bf96e9d2d3c26da688
parentd0256e1afc1ba721e98f377d8925e7b7282f5a99 (diff)
downloadUXP-d62795c868dff9a12a8868d09b3331cb8c4ad39b.tar
UXP-d62795c868dff9a12a8868d09b3331cb8c4ad39b.tar.gz
UXP-d62795c868dff9a12a8868d09b3331cb8c4ad39b.tar.lz
UXP-d62795c868dff9a12a8868d09b3331cb8c4ad39b.tar.xz
UXP-d62795c868dff9a12a8868d09b3331cb8c4ad39b.zip
Make copy of list before iterating over it.
-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();
}