Index: src/debug.cc |
diff --git a/src/debug.cc b/src/debug.cc |
index dad5234887a315548494cacc6d0aef737731dde5..854b507c47339fd21a9d61eb58ed6ebf3e32f4b5 100644 |
--- a/src/debug.cc |
+++ b/src/debug.cc |
@@ -519,7 +519,7 @@ void ScriptCache::Add(Handle<Script> script) { |
// Create an entry in the hash map for the script. |
int id = script->id()->value(); |
HashMap::Entry* entry = |
- HashMap::Lookup(reinterpret_cast<void*>(id), Hash(id), true); |
+ HashMap::LookupOrInsert(reinterpret_cast<void*>(id), Hash(id)); |
if (entry->value != NULL) { |
#ifdef DEBUG |
// The code deserializer may introduce duplicate Script objects. |
@@ -582,7 +582,8 @@ void ScriptCache::HandleWeakScript( |
// Remove the corresponding entry from the cache. |
ScriptCache* script_cache = |
reinterpret_cast<ScriptCache*>(data.GetParameter()); |
- HashMap::Entry* entry = script_cache->Lookup(key, hash, false); |
+ HashMap::Entry* entry = script_cache->Lookup(key, hash); |
+ DCHECK_NOT_NULL(entry); |
Object** location = reinterpret_cast<Object**>(entry->value); |
script_cache->Remove(key, hash); |