Chromium Code Reviews| Index: src/runtime.cc |
| diff --git a/src/runtime.cc b/src/runtime.cc |
| index c5b60e91d2aec12f1ac3ba354bb9982938967aec..73929e94d931cd4a772bc9d79f141c07b1b8b5c3 100644 |
| --- a/src/runtime.cc |
| +++ b/src/runtime.cc |
| @@ -1643,8 +1643,7 @@ RUNTIME_FUNCTION(Runtime_MapDelete) { |
| CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); |
| Handle<OrderedHashMap> table(OrderedHashMap::cast(holder->table())); |
| Handle<Object> lookup(table->Lookup(key), isolate); |
| - Handle<OrderedHashMap> new_table = |
| - OrderedHashMap::Put(table, key, isolate->factory()->the_hole_value()); |
| + Handle<OrderedHashMap> new_table = OrderedHashMap::Remove(table, key); |
|
adamk
2014/05/30 20:13:58
You probably want to use the was_present version h
arv (Not doing code reviews)
2014/05/30 20:53:07
Done.
|
| holder->set_table(*new_table); |
| return isolate->heap()->ToBoolean(!lookup->IsTheHole()); |
| } |
| @@ -1760,8 +1759,7 @@ RUNTIME_FUNCTION(Runtime_WeakCollectionDelete) { |
| weak_collection->table())); |
| RUNTIME_ASSERT(table->IsKey(*key)); |
| Handle<Object> lookup(table->Lookup(key), isolate); |
| - Handle<ObjectHashTable> new_table = |
| - ObjectHashTable::Put(table, key, isolate->factory()->the_hole_value()); |
| + Handle<ObjectHashTable> new_table = ObjectHashTable::Remove(table, key); |
| weak_collection->set_table(*new_table); |
| return isolate->heap()->ToBoolean(!lookup->IsTheHole()); |
| } |