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

Unified Diff: src/snapshot/serialize.h

Issue 1074943002: Split TemplateHashMapImpl::Lookup into two methods (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm (and ppc) builds Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: src/snapshot/serialize.h
diff --git a/src/snapshot/serialize.h b/src/snapshot/serialize.h
index 41c4286e2b2a65d4ea5216a9e4f0ea085d49d2ca..e05e33ca07a835e45e965e88cfcc27cbb3dfa233 100644
--- a/src/snapshot/serialize.h
+++ b/src/snapshot/serialize.h
@@ -81,7 +81,10 @@ class AddressMapBase {
inline static HashMap::Entry* LookupEntry(HashMap* map, HeapObject* obj,
bool insert) {
- return map->Lookup(Key(obj), Hash(obj), insert);
+ if (insert) {
+ map->LookupOrInsert(Key(obj), Hash(obj));
+ }
+ return map->Lookup(Key(obj), Hash(obj));
}
private:

Powered by Google App Engine
This is Rietveld 408576698