diff options
Diffstat (limited to '')
-rw-r--r-- | toolkit/components/uniffi-js/OwnedRustBuffer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toolkit/components/uniffi-js/OwnedRustBuffer.cpp b/toolkit/components/uniffi-js/OwnedRustBuffer.cpp index 4e334a966e..f14033a213 100644 --- a/toolkit/components/uniffi-js/OwnedRustBuffer.cpp +++ b/toolkit/components/uniffi-js/OwnedRustBuffer.cpp @@ -27,7 +27,7 @@ Result<OwnedRustBuffer, nsCString> OwnedRustBuffer::FromArrayBuffer( RustCallStatus status{}; RustBuffer buf = uniffi_rustbuffer_alloc( - static_cast<int32_t>(aData.Length()), &status); + static_cast<uint64_t>(aData.Length()), &status); buf.len = aData.Length(); if (status.code != 0) { if (status.error_buf.data) { @@ -84,7 +84,7 @@ RustBuffer OwnedRustBuffer::IntoRustBuffer() { JSObject* OwnedRustBuffer::IntoArrayBuffer(JSContext* cx) { JS::Rooted<JSObject*> obj(cx); { - int32_t len = mBuf.len; + auto len = mBuf.len; void* data = mBuf.data; auto userData = MakeUnique<OwnedRustBuffer>(std::move(*this)); UniquePtr<void, JS::BufferContentsDeleter> dataPtr{ |