Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/DOMWrapperMap.h

Issue 2709033003: Migrate WTF::HashMap::get() to ::at() (Closed)
Patch Set: rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return iter->value; 107 return iter->value;
108 } 108 }
109 static KeyType* Key(Iterator& iter) { return iter->key; } 109 static KeyType* Key(Iterator& iter) { return iter->key; }
110 static v8::PersistentContainerValue 110 static v8::PersistentContainerValue
111 Set(Impl* impl, KeyType* key, v8::PersistentContainerValue value) { 111 Set(Impl* impl, KeyType* key, v8::PersistentContainerValue value) {
112 v8::PersistentContainerValue oldValue = Get(impl, key); 112 v8::PersistentContainerValue oldValue = Get(impl, key);
113 impl->set(key, value); 113 impl->set(key, value);
114 return oldValue; 114 return oldValue;
115 } 115 }
116 static v8::PersistentContainerValue Get(const Impl* impl, KeyType* key) { 116 static v8::PersistentContainerValue Get(const Impl* impl, KeyType* key) {
117 return impl->get(key); 117 return impl->at(key);
118 } 118 }
119 119
120 static v8::PersistentContainerValue Remove(Impl* impl, KeyType* key) { 120 static v8::PersistentContainerValue Remove(Impl* impl, KeyType* key) {
121 return impl->take(key); 121 return impl->take(key);
122 } 122 }
123 123
124 // Weak traits: 124 // Weak traits:
125 static const v8::PersistentContainerCallbackType kCallbackType = 125 static const v8::PersistentContainerCallbackType kCallbackType =
126 v8::kWeakWithInternalFields; 126 v8::kWeakWithInternalFields;
127 typedef v8::GlobalValueMap<KeyType*, v8::Object, PersistentValueMapTraits> 127 typedef v8::GlobalValueMap<KeyType*, v8::Object, PersistentValueMapTraits>
(...skipping 28 matching lines...) Expand all
156 static void DisposeWeak(const v8::WeakCallbackInfo<WeakCallbackDataType>&); 156 static void DisposeWeak(const v8::WeakCallbackInfo<WeakCallbackDataType>&);
157 }; 157 };
158 158
159 v8::Isolate* m_isolate; 159 v8::Isolate* m_isolate;
160 typename PersistentValueMapTraits::MapType m_map; 160 typename PersistentValueMapTraits::MapType m_map;
161 }; 161 };
162 162
163 } // namespace blink 163 } // namespace blink
164 164
165 #endif // DOMWrapperMap_h 165 #endif // DOMWrapperMap_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698