Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: test/cctest/test-weakmaps.cc

Issue 1314053003: Move runtime helper for JSWeakCollection onto objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-runtime-helpers-1
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-collections.cc ('k') | test/cctest/test-weaksets.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-weakmaps.cc
diff --git a/test/cctest/test-weakmaps.cc b/test/cctest/test-weakmaps.cc
index 31b812e2874b4b985d3f2a17c358af206656026a..6cab081b8bb8d949e01eff96ed7efd8358cecfb0 100644
--- a/test/cctest/test-weakmaps.cc
+++ b/test/cctest/test-weakmaps.cc
@@ -89,9 +89,9 @@ TEST(Weakness) {
Handle<JSObject> object = factory->NewJSObjectFromMap(map);
Handle<Smi> smi(Smi::FromInt(23), isolate);
int32_t hash = Object::GetOrCreateHash(isolate, key)->value();
- Runtime::WeakCollectionSet(weakmap, key, object, hash);
+ JSWeakCollection::Set(weakmap, key, object, hash);
int32_t object_hash = Object::GetOrCreateHash(isolate, object)->value();
- Runtime::WeakCollectionSet(weakmap, object, smi, object_hash);
+ JSWeakCollection::Set(weakmap, object, smi, object_hash);
}
CHECK_EQ(2, ObjectHashTable::cast(weakmap->table())->NumberOfElements());
@@ -147,7 +147,7 @@ TEST(Shrinking) {
Handle<JSObject> object = factory->NewJSObjectFromMap(map);
Handle<Smi> smi(Smi::FromInt(i), isolate);
int32_t object_hash = Object::GetOrCreateHash(isolate, object)->value();
- Runtime::WeakCollectionSet(weakmap, object, smi, object_hash);
+ JSWeakCollection::Set(weakmap, object, smi, object_hash);
}
}
@@ -196,7 +196,7 @@ TEST(Regress2060a) {
CHECK(!heap->InNewSpace(object->address()));
CHECK(!first_page->Contains(object->address()));
int32_t hash = Object::GetOrCreateHash(isolate, key)->value();
- Runtime::WeakCollectionSet(weakmap, key, object, hash);
+ JSWeakCollection::Set(weakmap, key, object, hash);
}
}
@@ -239,7 +239,7 @@ TEST(Regress2060b) {
for (int i = 0; i < 32; i++) {
Handle<Smi> smi(Smi::FromInt(i), isolate);
int32_t hash = Object::GetOrCreateHash(isolate, keys[i])->value();
- Runtime::WeakCollectionSet(weakmap, keys[i], smi, hash);
+ JSWeakCollection::Set(weakmap, keys[i], smi, hash);
}
// Force compacting garbage collection. The subsequent collections are used
« no previous file with comments | « src/runtime/runtime-collections.cc ('k') | test/cctest/test-weaksets.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698