Lines Matching defs:key

57   static PersistentContainerValue Set(Impl* impl, K key,
59 std::pair<Iterator, bool> res = impl->insert(std::make_pair(key, value));
67 static PersistentContainerValue Get(Impl* impl, K key) {
68 Iterator it = impl->find(key);
72 static PersistentContainerValue Remove(Impl* impl, K key) {
73 Iterator it = impl->find(key);
100 MapType* map, const K& key, Local<V> value) {
112 static void Dispose(Isolate* isolate, Global<V> value, K key) {}
128 static WeakCallbackDataType* WeakCallbackParameter(MapType* map, const K& key,
143 static void Dispose(Isolate* isolate, Global<V> value, K key) {}
183 Local<V> Get(const K& key) {
184 V* p = FromVal(Traits::Get(&impl_, key));
194 bool Contains(const K& key) {
195 return Traits::Get(&impl_, key) != kPersistentContainerNotFound;
202 bool SetReturnValue(const K& key,
204 return SetReturnValueFromVal(&returnValue, Traits::Get(&impl_, key));
208 * Return value for key and remove it from the map.
210 Global<V> Remove(const K& key) {
211 return Release(Traits::Remove(&impl_, key)).Pass();
280 * The value will become invalid if the value for this key changes
282 * key; as a result of the weak callback for the same key; or as a
285 PersistentValueReference GetReference(const K& key) {
286 return PersistentValueReference(Traits::Get(&impl_, key));
329 void RemoveWeak(const K& key) {
332 FromVal(Traits::Remove(&impl_, key)));
376 Global<V> Set(const K& key, Local<V> value) {
378 return SetUnique(key, &persistent);
384 Global<V> Set(const K& key, Global<V> value) {
385 return SetUnique(key, &value);
392 Global<V> SetUnique(const K& key, Global<V>* persistent) {
402 Traits::WeakCallbackParameter(this, key, value), WeakCallback,
406 Traits::Set(this->impl(), key, this->ClearAndLeak(persistent));
414 Global<V> Set(const K& key, Global<V> value,
417 return SetUnique(key, &value);
426 K key = Traits::KeyFromWeakCallbackInfo(data);
428 persistentValueMap->Remove(key).Pass(), key);
452 Global<V> Set(const K& key, Local<V> value) {
454 return SetUnique(key, &persistent);
460 Global<V> Set(const K& key, Global<V> value) {
461 return SetUnique(key, &value);
468 Global<V> SetUnique(const K& key, Global<V>* persistent) {
478 Traits::WeakCallbackParameter(this, key, value), OnWeakCallback,
482 Traits::Set(this->impl(), key, this->ClearAndLeak(persistent));
490 Global<V> Set(const K& key, Global<V> value,
493 return SetUnique(key, &value);
501 K key = Traits::KeyFromWeakCallbackInfo(data);
502 map->RemoveWeak(key);