Don't pull multiple borrows on the same `GcCell`

This commit is contained in:
David Wendt 2019-10-13 17:54:09 -04:00
parent 911de06584
commit e830273fe5
1 changed files with 4 additions and 3 deletions

View File

@ -223,11 +223,12 @@ impl<'gc> Avm1<'gc> {
self.is_reading = true;
let (frame_cell, swf_version, data, pc) = self.stack_frames.last().map(|frame| {
let frame_ref = frame.read();
(
frame.clone(),
frame.read().swf_version(),
frame.read().data(),
frame.read().pc(),
frame_ref.swf_version(),
frame_ref.data(),
frame_ref.pc(),
)
})?;
let mut read = Reader::new(data.as_ref(), swf_version);