Publish native arity and validate callback contracts before registration
Verify Tessera GUI / verify (push) Failing after 7m44s
Verify Tessera GUI / verify (push) Failing after 7m44s
This commit is contained in:
@@ -133,6 +133,10 @@ struct Collect {
|
||||
output: Output,
|
||||
}
|
||||
impl NativeCallable for Collect {
|
||||
fn arity(&self) -> Option<endor_core::CallArity> {
|
||||
Some(endor_core::CallArity::exact(1))
|
||||
}
|
||||
|
||||
fn invoke(&self, cx: &mut NativeContext<'_>, args: &[Value]) -> Result<NativeResult, VmError> {
|
||||
let [Value::Object(result)] = args else {
|
||||
return Err(invalid("paint must return a DisplayList"));
|
||||
@@ -168,6 +172,10 @@ struct Prepare {
|
||||
output: Output,
|
||||
}
|
||||
impl NativeCallable for Prepare {
|
||||
fn arity(&self) -> Option<endor_core::CallArity> {
|
||||
Some(endor_core::CallArity::exact(0))
|
||||
}
|
||||
|
||||
fn invoke(&self, cx: &mut NativeContext<'_>, _: &[Value]) -> Result<NativeResult, VmError> {
|
||||
let block_type = named_type(cx.store(), self.desktop, "Block")?;
|
||||
let native = cx
|
||||
|
||||
Reference in New Issue
Block a user