diff options
author | Yaron Tausky <ytausky@mozilla.com> | 2020-01-09 22:23:13 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-09 22:23:13 +0100 |
commit | 51b1cd97aa1c9204d22535038ad1463d89f93232 (patch) | |
tree | d0e81ba498e613ce291f138f62338ba584538805 /dom/cache/StreamControl.cpp | |
parent | 8198126c39ff8752972c32bb877af5df5fb05c8e (diff) | |
download | UXP-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/StreamControl.cpp')
-rw-r--r-- | dom/cache/StreamControl.cpp | 3 |
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(); } |