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

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

Issue 257633002: HashTable::New() handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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.cc ('k') | test/cctest/test-weakmaps.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-dictionary.cc
diff --git a/test/cctest/test-dictionary.cc b/test/cctest/test-dictionary.cc
index fdd35ec0b430cf295b80587c5545a8ab467ca80d..8e218b5dd13f3fd18146ce090f79c53bca576d85 100644
--- a/test/cctest/test-dictionary.cc
+++ b/test/cctest/test-dictionary.cc
@@ -106,7 +106,7 @@ TEST(HashMap) {
LocalContext context;
v8::HandleScope scope(context->GetIsolate());
Isolate* isolate = CcTest::i_isolate();
- TestHashMap(isolate->factory()->NewObjectHashTable(23));
+ TestHashMap(ObjectHashTable::New(isolate, 23));
TestHashMap(isolate->factory()->NewOrderedHashMap());
}
@@ -131,11 +131,10 @@ class ObjectHashTableTest: public ObjectHashTable {
TEST(HashTableRehash) {
LocalContext context;
Isolate* isolate = CcTest::i_isolate();
- Factory* factory = isolate->factory();
v8::HandleScope scope(context->GetIsolate());
// Test almost filled table.
{
- Handle<ObjectHashTable> table = factory->NewObjectHashTable(100);
+ Handle<ObjectHashTable> table = ObjectHashTable::New(isolate, 100);
ObjectHashTableTest* t = reinterpret_cast<ObjectHashTableTest*>(*table);
int capacity = t->capacity();
for (int i = 0; i < capacity - 1; i++) {
@@ -148,7 +147,7 @@ TEST(HashTableRehash) {
}
// Test half-filled table.
{
- Handle<ObjectHashTable> table = factory->NewObjectHashTable(100);
+ Handle<ObjectHashTable> table = ObjectHashTable::New(isolate, 100);
ObjectHashTableTest* t = reinterpret_cast<ObjectHashTableTest*>(*table);
int capacity = t->capacity();
for (int i = 0; i < capacity / 2; i++) {
@@ -240,7 +239,7 @@ TEST(ObjectHashTableCausesGC) {
LocalContext context;
v8::HandleScope scope(context->GetIsolate());
Isolate* isolate = CcTest::i_isolate();
- TestHashMapCausesGC(isolate->factory()->NewObjectHashTable(1));
+ TestHashMapCausesGC(ObjectHashTable::New(isolate, 1));
TestHashMapCausesGC(isolate->factory()->NewOrderedHashMap());
}
#endif
« no previous file with comments | « src/runtime.cc ('k') | test/cctest/test-weakmaps.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698