Commit 28eda86a authored by rossberg@chromium.org's avatar rossberg@chromium.org
parent ca15feec
...@@ -1547,7 +1547,7 @@ RUNTIME_FUNCTION(Runtime_SetAdd) { ...@@ -1547,7 +1547,7 @@ RUNTIME_FUNCTION(Runtime_SetAdd) {
Handle<OrderedHashSet> table(OrderedHashSet::cast(holder->table())); Handle<OrderedHashSet> table(OrderedHashSet::cast(holder->table()));
table = OrderedHashSet::Add(table, key); table = OrderedHashSet::Add(table, key);
holder->set_table(*table); holder->set_table(*table);
return isolate->heap()->undefined_value(); return *holder;
} }
...@@ -1685,7 +1685,7 @@ RUNTIME_FUNCTION(Runtime_MapSet) { ...@@ -1685,7 +1685,7 @@ RUNTIME_FUNCTION(Runtime_MapSet) {
Handle<OrderedHashMap> table(OrderedHashMap::cast(holder->table())); Handle<OrderedHashMap> table(OrderedHashMap::cast(holder->table()));
Handle<OrderedHashMap> new_table = OrderedHashMap::Put(table, key, value); Handle<OrderedHashMap> new_table = OrderedHashMap::Put(table, key, value);
holder->set_table(*new_table); holder->set_table(*new_table);
return isolate->heap()->undefined_value(); return *holder;
} }
...@@ -1799,7 +1799,7 @@ RUNTIME_FUNCTION(Runtime_WeakCollectionSet) { ...@@ -1799,7 +1799,7 @@ RUNTIME_FUNCTION(Runtime_WeakCollectionSet) {
RUNTIME_ASSERT(table->IsKey(*key)); RUNTIME_ASSERT(table->IsKey(*key));
Handle<ObjectHashTable> new_table = ObjectHashTable::Put(table, key, value); Handle<ObjectHashTable> new_table = ObjectHashTable::Put(table, key, value);
weak_collection->set_table(*new_table); weak_collection->set_table(*new_table);
return isolate->heap()->undefined_value(); return *weak_collection;
} }
......
...@@ -68,7 +68,7 @@ TestInvalidCalls(new WeakMap); ...@@ -68,7 +68,7 @@ TestInvalidCalls(new WeakMap);
// Test expected behavior for WeakSets // Test expected behavior for WeakSets
function TestSet(set, key) { function TestSet(set, key) {
assertFalse(set.has(key)); assertFalse(set.has(key));
assertSame(undefined, set.add(key)); assertSame(set, set.add(key));
assertTrue(set.has(key)); assertTrue(set.has(key));
assertTrue(set.delete(key)); assertTrue(set.delete(key));
assertFalse(set.has(key)); assertFalse(set.has(key));
...@@ -92,7 +92,7 @@ TestSet(new WeakSet, new Object); ...@@ -92,7 +92,7 @@ TestSet(new WeakSet, new Object);
// Test expected mapping behavior for WeakMaps // Test expected mapping behavior for WeakMaps
function TestMapping(map, key, value) { function TestMapping(map, key, value) {
assertSame(undefined, map.set(key, value)); assertSame(map, map.set(key, value));
assertSame(value, map.get(key)); assertSame(value, map.get(key));
} }
function TestMapBehavior1(m) { function TestMapBehavior1(m) {
......
...@@ -67,7 +67,7 @@ TestInvalidCalls(new WeakMap); ...@@ -67,7 +67,7 @@ TestInvalidCalls(new WeakMap);
// Test expected behavior for Sets and WeakSets // Test expected behavior for Sets and WeakSets
function TestSet(set, key) { function TestSet(set, key) {
assertFalse(set.has(key)); assertFalse(set.has(key));
assertSame(undefined, set.add(key)); assertSame(set, set.add(key));
assertTrue(set.has(key)); assertTrue(set.has(key));
assertTrue(set.delete(key)); assertTrue(set.delete(key));
assertFalse(set.has(key)); assertFalse(set.has(key));
...@@ -92,7 +92,7 @@ TestSet(new WeakSet, new Object); ...@@ -92,7 +92,7 @@ TestSet(new WeakSet, new Object);
// Test expected mapping behavior for Maps and WeakMaps // Test expected mapping behavior for Maps and WeakMaps
function TestMapping(map, key, value) { function TestMapping(map, key, value) {
assertSame(undefined, map.set(key, value)); assertSame(map, map.set(key, value));
assertSame(value, map.get(key)); assertSame(value, map.get(key));
} }
function TestMapBehavior1(m) { function TestMapBehavior1(m) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment