avm2: Make Activation::from_builtin non-Result

This commit is contained in:
Adrian Wielgosik 2024-03-09 17:05:43 +01:00 committed by Adrian Wielgosik
parent 064cc14905
commit dce71fdfcb
2 changed files with 4 additions and 4 deletions

View File

@ -520,10 +520,10 @@ impl<'a, 'gc> Activation<'a, 'gc> {
outer: ScopeChain<'gc>,
caller_domain: Option<Domain<'gc>>,
caller_movie: Option<Arc<SwfMovie>>,
) -> Result<Self, Error<'gc>> {
) -> Self {
let local_registers = RegisterSet::new(0);
Ok(Self {
Self {
ip: 0,
actions_since_timeout_check: 0,
local_registers,
@ -537,7 +537,7 @@ impl<'a, 'gc> Activation<'a, 'gc> {
max_stack_size: 0,
max_scope_size: 0,
context,
})
}
}
/// Call the superclass's instance initializer.

View File

@ -133,7 +133,7 @@ impl<'gc> Executable<'gc> {
bm.scope,
caller_domain,
caller_movie,
)?;
);
if arguments.len() > bm.method.signature.len() && !bm.method.is_variadic {
return Err(format!(