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(); }