Bug 1951241 - Refactor ScaffoldingConverter.h, r=markh,nika,frontend-codestyle-reviewers

Replaced `ScaffoldingConverter` with a set of `FfiValue*` classes.  The
differences are:

* The new classes better match other `uniffi-bindgen-gecko-js` names,
  and also use familiar UniFFI terms like `Lift` and `Lower`.
* Object handles are now freed if there's an error.
* The new classes store the FFI value internal rather than defining an
  `IntermediateType` associated type.
* Moved header files into `mozilla/uniffi/` and removed the `UniFFI`
  prefix from the filename.  This avoids weird filenames like
  `UniFFIFfiValue.h`

Differential Revision: https://phabricator.services.mozilla.com/D240696
This commit is contained in:
Ben Dean-Kawamura
2025-04-11 12:58:06 +00:00
parent 994cbc2e9e
commit 02e1f4d5fd
24 changed files with 1953 additions and 2106 deletions

View File

@@ -69,8 +69,7 @@ xpcom/reflect/xptcall/md/unix/.*
# Askama template code, which isn't valid C++ in its original form
toolkit/components/uniffi-bindgen-gecko-js/src/templates/.*
# Generated from that template code
toolkit/components/uniffi-js/UniFFIGeneratedScaffolding.cpp
toolkit/components/uniffi-js/UniFFIFixtureScaffolding.cpp
toolkit/components/uniffi-js/GeneratedScaffolding.cpp
# Generated from ./tools/rewriting/ThirdPartyPaths.txt
# awk '{print ""$1".*"}' ./tools/rewriting/ThirdPartyPaths.txt