27 if (!table_candidate.ToHandle(&table)) {
29 DCHECK(isolate->has_exception());
30 isolate->clear_exception();
32 isolate, NewRangeError(MessageTemplate::kOutOfMemory, method_name));
44 if (!table_candidate.
ToHandle(&table)) {
46 DCHECK(isolate->has_exception());
47 isolate->clear_exception();
50 NewRangeError(MessageTemplate::kCollectionGrowFailed,
51 isolate->factory()->NewStringFromAsciiChecked(
"Set")));
53 holder->set_table(*table);
63 holder->set_table(*table);
81 holder->set_table(*table);
92 if (!table_candidate.
ToHandle(&table)) {
94 DCHECK(isolate->has_exception());
95 isolate->clear_exception();
98 NewRangeError(MessageTemplate::kCollectionGrowFailed,
99 isolate->factory()->NewStringFromAsciiChecked(
"Map")));
101 holder->set_table(*table);
112 if (!table_candidate.ToHandle(&table)) {
114 DCHECK(isolate->has_exception());
115 isolate->clear_exception();
117 isolate, NewRangeError(MessageTemplate::kOutOfMemory, methodName));
127 int hash =
args.smi_value_at(2);
136 DCHECK(table->NumberOfElements() - 1 <= (table->Capacity() >> 2) &&
137 table->NumberOfElements() - 1 >= 16);
141 return isolate->heap()->ToBoolean(was_present);
150 int hash =
args.smi_value_at(3);
159 DCHECK((table->NumberOfDeletedElements() << 1) > table->NumberOfElements() ||
160 !table->HasSufficientCapacityToAdd(1));
164 return *weak_collection;
static bool Delete(DirectHandle< JSWeakCollection > collection, DirectHandle< Object > key, int32_t hash)
static V8_EXPORT_PRIVATE void Set(DirectHandle< JSWeakCollection > collection, DirectHandle< Object > key, DirectHandle< Object > value, int32_t hash)
V8_WARN_UNUSED_RESULT V8_INLINE bool ToHandle(Handle< S > *out) const
static bool CanBeHeldWeakly(Tagged< Object > obj)
static HandleType< OrderedHashSet > Shrink(Isolate *isolate, HandleType< OrderedHashSet > table)
static HandleType< OrderedHashSet >::MaybeType EnsureCapacityForAdding(Isolate *isolate, HandleType< OrderedHashSet > table)
#define RUNTIME_FUNCTION(Name)
#define THROW_NEW_ERROR_RETURN_FAILURE(isolate, call)
base::Vector< const DirectHandle< Object > > args
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)