summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2022-06-15 01:27:04 -0500
committerBrian Smith <brian@dbsoft.org>2022-06-15 01:27:04 -0500
commitf924d979d537fe9ed871ad9753b71e043b740d96 (patch)
tree5a3ab1dc39bd11b2f9df5ac112db5b2be0102027 /js
parent2d9b9a9617626d879e41ae3277c4253b32d0286c (diff)
downloaduxp-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.cpp15
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: