Warn when attempting to attach a second continuation onto an existing stack frame, since we don't support that use case.
This commit is contained in:
parent
a2ee7f9e3a
commit
dd4462c104
|
@ -348,6 +348,10 @@ impl<'gc> Activation<'gc> {
|
||||||
/// called in lieu of pushing the return value onto the stack, and may
|
/// called in lieu of pushing the return value onto the stack, and may
|
||||||
/// perform any necessary AVM action.
|
/// perform any necessary AVM action.
|
||||||
pub fn and_then(&mut self, func: Box<dyn StackContinuation<'gc>>) {
|
pub fn and_then(&mut self, func: Box<dyn StackContinuation<'gc>>) {
|
||||||
|
if self.then_func.is_some() {
|
||||||
|
log::error!("Attaching two continuations to the same stack frame is not supported. The previous continuation will be discarded.");
|
||||||
|
}
|
||||||
|
|
||||||
self.then_func = Some(func);
|
self.then_func = Some(func);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue