Harden %WeakCollectionSet.
R=mstarzinger@chromium.org BUG= Review URL: https://codereview.chromium.org/279863002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
cb2bec3b47
commit
fbe16b09f2
@ -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()));
|
||||
|
Loading…
Reference in New Issue
Block a user