There were 2 issues:
- I didn't finish renaming `free` to `destroy` in all places.
- The code in CallbackInterfaceRuntime.sys.mjs was still expecting an
ArrayBuffer with serialized arguments, rather than an array with
each argument separately. The tests were passing because of a
lack of typing and dumb luck. Added some more tests to hopefully
avoid this in the future.
There's a few other changes as well:
- Moved the callbacks fixture to using proc-macros.
- Added an if in the template code to avoid an `AppendElements` call with 0 elements.
- Made `uniffiArgs` an `nsTArray` rather than a `Sequence`. `nsTArray`
is easier to find in the docs and it's what the `Call` method expects
anyways.
Differential Revision: https://phabricator.services.mozilla.com/D227763