Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index ec2834e689083a822afa5251298326dbe89875e7..680a3f738abd3f5ad0e620b8162a56a67523280d 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -1742,6 +1742,7 @@ RUNTIME_FUNCTION(Runtime_WeakCollectionGet) { |
ASSERT(args.length() == 2); |
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0); |
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); |
+ RUNTIME_ASSERT(key->IsJSReceiver() || key->IsSymbol()); |
Handle<ObjectHashTable> table( |
ObjectHashTable::cast(weak_collection->table())); |
RUNTIME_ASSERT(table->IsKey(*key)); |
@@ -1755,6 +1756,7 @@ RUNTIME_FUNCTION(Runtime_WeakCollectionHas) { |
ASSERT(args.length() == 2); |
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0); |
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); |
+ RUNTIME_ASSERT(key->IsJSReceiver() || key->IsSymbol()); |
Handle<ObjectHashTable> table( |
ObjectHashTable::cast(weak_collection->table())); |
RUNTIME_ASSERT(table->IsKey(*key)); |
@@ -1768,6 +1770,7 @@ RUNTIME_FUNCTION(Runtime_WeakCollectionDelete) { |
ASSERT(args.length() == 2); |
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0); |
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); |
+ RUNTIME_ASSERT(key->IsJSReceiver() || key->IsSymbol()); |
Handle<ObjectHashTable> table(ObjectHashTable::cast( |
weak_collection->table())); |
RUNTIME_ASSERT(table->IsKey(*key)); |
@@ -1784,6 +1787,7 @@ RUNTIME_FUNCTION(Runtime_WeakCollectionSet) { |
ASSERT(args.length() == 3); |
CONVERT_ARG_HANDLE_CHECKED(JSWeakCollection, weak_collection, 0); |
CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); |
+ RUNTIME_ASSERT(key->IsJSReceiver() || key->IsSymbol()); |
CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); |
Handle<ObjectHashTable> table( |
ObjectHashTable::cast(weak_collection->table())); |