0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2025-03-09 05:27:08 -04:00

fix: EstimateMemoryUsage returns size_t now (#1729)

This commit is contained in:
snek 2025-03-06 20:04:27 +01:00 committed by GitHub
parent e4e8a503a5
commit e964a3a337
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -284,8 +284,8 @@ unsafe extern "C" fn one_byte_const_unaccount(
}
unsafe extern "C" fn one_byte_const_estimate_memory_usage(
_this: *const OneByteConst,
) -> int {
-1
) -> size_t {
usize::MAX // ExternalStringResource::kDefaultMemoryEstimate
}
unsafe extern "C" fn one_byte_const_estimate_shared_memory_usage(
_this: *const OneByteConst,
@ -302,7 +302,7 @@ type OneByteConstLength = unsafe extern "C" fn(*const OneByteConst) -> usize;
type OneByteConstUnaccount =
unsafe extern "C" fn(*const OneByteConst, *mut Isolate);
type OneByteConstEstimateMemoryUsage =
unsafe extern "C" fn(*const OneByteConst) -> int;
unsafe extern "C" fn(*const OneByteConst) -> size_t;
type OneByteConstEstimateSharedMemoryUsage =
unsafe extern "C" fn(*const OneByteConst, *mut ());