text: Use retire_stack_frame after firing text bindings

This commit is contained in:
Mike Welsh 2020-06-28 23:37:50 -07:00
parent ed82d984d2
commit 93cf7a1386
2 changed files with 3 additions and 8 deletions

View File

@ -408,11 +408,6 @@ impl<'gc> Avm1<'gc> {
!self.stack_frames.is_empty() !self.stack_frames.is_empty()
} }
/// Remove the current stack frame.
pub fn pop_stack_frame(&mut self) {
self.stack_frames.pop();
}
/// Get the currently executing SWF version. /// Get the currently executing SWF version.
pub fn current_swf_version(&self) -> u8 { pub fn current_swf_version(&self) -> u8 {
self.current_stack_frame() self.current_stack_frame()
@ -517,7 +512,7 @@ impl<'gc> Avm1<'gc> {
/// get it's return value, you won't get that value. Instead, retain a cell /// get it's return value, you won't get that value. Instead, retain a cell
/// referencing the oldest activation frame and use that to retrieve the /// referencing the oldest activation frame and use that to retrieve the
/// return value. /// return value.
fn retire_stack_frame( pub fn retire_stack_frame(
&mut self, &mut self,
context: &mut UpdateContext<'_, 'gc, '_>, context: &mut UpdateContext<'_, 'gc, '_>,
return_value: Value<'gc>, return_value: Value<'gc>,

View File

@ -748,7 +748,7 @@ impl<'gc> EditText<'gc> {
} }
} }
avm.pop_stack_frame(); avm.retire_stack_frame(context, Value::Undefined);
} }
bound bound
@ -797,7 +797,7 @@ impl<'gc> EditText<'gc> {
context, context,
); );
let _ = object.set(property, text.into(), avm, context); let _ = object.set(property, text.into(), avm, context);
avm.pop_stack_frame(); avm.retire_stack_frame(context, Value::Undefined);
} }
} }
self.0.write(context.gc_context).firing_variable_binding = false; self.0.write(context.gc_context).firing_variable_binding = false;