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

Unified Diff: test/cctest/test-weaksets.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 | « test/cctest/test-weakmaps.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-weaksets.cc
diff --git a/test/cctest/test-weaksets.cc b/test/cctest/test-weaksets.cc
index 9fa44c826d48626b72bdd65b3afddd67ceb6b3d3..a3a94789736acbfd74af5c956c8aa619eeb5e5f8 100644
--- a/test/cctest/test-weaksets.cc
+++ b/test/cctest/test-weaksets.cc
@@ -43,14 +43,12 @@ static Isolate* GetIsolateFrom(LocalContext* context) {
static Handle<JSWeakSet> AllocateJSWeakSet(Isolate* isolate) {
Factory* factory = isolate->factory();
- Heap* heap = isolate->heap();
Handle<Map> map = factory->NewMap(JS_WEAK_SET_TYPE, JSWeakSet::kSize);
Handle<JSObject> weakset_obj = factory->NewJSObjectFromMap(map);
Handle<JSWeakSet> weakset(JSWeakSet::cast(*weakset_obj));
// Do not use handles for the hash table, it would make entries strong.
- Object* table_obj = ObjectHashTable::Allocate(heap, 1)->ToObjectChecked();
- ObjectHashTable* table = ObjectHashTable::cast(table_obj);
- weakset->set_table(table);
+ Handle<ObjectHashTable> table = ObjectHashTable::New(isolate, 1);
+ weakset->set_table(*table);
weakset->set_next(Smi::FromInt(0));
return weakset;
}
« no previous file with comments | « test/cctest/test-weakmaps.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698