20 if (!
IsSmi(*length_number)) {
22 isolate, NewRangeError(MessageTemplate::kSharedArraySizeOutOfRange));
25 int length =
Cast<Smi>(*length_number).value();
28 isolate, NewRangeError(MessageTemplate::kSharedArraySizeOutOfRange));
31 return *isolate->factory()->NewJSSharedArray(
args.target(), length);
36 return isolate->heap()->ToBoolean(
37 IsJSSharedArray(*
args.atOrUndefined(isolate, 1)));
static V8_WARN_UNUSED_RESULT HandleType< Number >::MaybeType ToInteger(Isolate *isolate, HandleType< T > input)
static constexpr int kMaxCapacity
#define ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, dst, call)
#define THROW_NEW_ERROR_RETURN_FAILURE(isolate, call)
base::Vector< const DirectHandle< Object > > args
V8_INLINE constexpr bool IsSmi(TaggedImpl< kRefType, StorageType > obj)
V8_EXPORT_PRIVATE FlagValues v8_flags
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
#define DCHECK(condition)