Index: src/d8.h |
diff --git a/src/d8.h b/src/d8.h |
index 90dde1541ee9b30d57ad0268256dbb8acd56b299..1d73c0e1c26bd1489d137d98fee4bf29513ee5a2 100644 |
--- a/src/d8.h |
+++ b/src/d8.h |
@@ -58,18 +58,14 @@ class CounterMap { |
public: |
CounterMap(): hash_map_(Match) { } |
Counter* Lookup(const char* name) { |
- i::HashMap::Entry* answer = hash_map_.Lookup( |
- const_cast<char*>(name), |
- Hash(name), |
- false); |
+ i::HashMap::Entry* answer = |
+ hash_map_.Lookup(const_cast<char*>(name), Hash(name)); |
if (!answer) return NULL; |
return reinterpret_cast<Counter*>(answer->value); |
} |
void Set(const char* name, Counter* value) { |
- i::HashMap::Entry* answer = hash_map_.Lookup( |
- const_cast<char*>(name), |
- Hash(name), |
- true); |
+ i::HashMap::Entry* answer = |
+ hash_map_.LookupOrInsert(const_cast<char*>(name), Hash(name)); |
DCHECK(answer != NULL); |
answer->value = value; |
} |