LibCrypto: Convert SignedBigInteger::import_data to accept Bytes

This brings it up to par with UnsignedBigInteger.
This commit is contained in:
Idan Horowitz 2025-08-05 03:04:32 +03:00 committed by Ali Mohammad Pur
parent b0fdbe3756
commit 110136b862
Notes: github-actions[bot] 2025-08-05 07:10:20 +00:00
3 changed files with 5 additions and 6 deletions

View file

@ -310,7 +310,7 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyModule::get_export)
return JS::Value(global->value().to<double>());
case Wasm::ValueType::V128: {
auto value = global->value().to<u128>();
return JS::BigInt::create(vm, Crypto::SignedBigInteger::import_data(bit_cast<u8 const*>(&value), sizeof(u128)));
return JS::BigInt::create(vm, Crypto::SignedBigInteger::import_data(value.bytes()));
}
case Wasm::ValueType::FunctionReference:
case Wasm::ValueType::ExternReference: