diff options
author | Brian Smith <brian@dbsoft.org> | 2022-06-15 01:27:04 -0500 |
---|---|---|
committer | Brian Smith <brian@dbsoft.org> | 2022-06-15 01:27:04 -0500 |
commit | f924d979d537fe9ed871ad9753b71e043b740d96 (patch) | |
tree | 5a3ab1dc39bd11b2f9df5ac112db5b2be0102027 /js | |
parent | 2d9b9a9617626d879e41ae3277c4253b32d0286c (diff) | |
download | uxp-f924d979d537fe9ed871ad9753b71e043b740d96.tar.gz |
Issue #1905 - Part 4b - Fix issue loading the profile and saving changes to the profile.
Based on the following Mozilla bugs: 1659904, 1659905 and 1659077.
Diffstat (limited to 'js')
-rw-r--r-- | js/src/ctypes/CTypes.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp index b75b42072f..3bc249e015 100644 --- a/js/src/ctypes/CTypes.cpp +++ b/js/src/ctypes/CTypes.cpp @@ -6708,12 +6708,15 @@ PrepareCIF(JSContext* cx, if (!rtype) return false; - ffi_status status = - ffi_prep_cif(&fninfo->mCIF, - abi, - fninfo->mFFITypes.length(), - rtype, - fninfo->mFFITypes.begin()); + ffi_status status; + if (fninfo->mIsVariadic) { + status = ffi_prep_cif_var(&fninfo->mCIF, abi, fninfo->mArgTypes.length(), + fninfo->mFFITypes.length(), rtype, + fninfo->mFFITypes.begin()); + } else { + status = ffi_prep_cif(&fninfo->mCIF, abi, fninfo->mFFITypes.length(), rtype, + fninfo->mFFITypes.begin()); + } switch (status) { case FFI_OK: |