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

Unified Diff: test/cctest/test-global-handles.cc

Issue 236303015: Remove some uses of MaybeObject methods. (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-strings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-global-handles.cc
diff --git a/test/cctest/test-global-handles.cc b/test/cctest/test-global-handles.cc
index 48b6655bbcd5376cf43f15e415a0ffe9c82be2c3..1ab90ec5ec11a9d47db8145f20335b578a52c5ba 100644
--- a/test/cctest/test-global-handles.cc
+++ b/test/cctest/test-global-handles.cc
@@ -86,19 +86,19 @@ class TestObjectVisitor : public ObjectVisitor {
TEST(IterateObjectGroupsOldApi) {
CcTest::InitializeVM();
- GlobalHandles* global_handles = CcTest::i_isolate()->global_handles();
- Heap* heap = CcTest::heap();
+ Isolate* isolate = CcTest::i_isolate();
+ GlobalHandles* global_handles = isolate->global_handles();
v8::HandleScope handle_scope(CcTest::isolate());
Handle<Object> g1s1 =
- global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
+ global_handles->Create(*isolate->factory()->NewFixedArray(1));
Handle<Object> g1s2 =
- global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
+ global_handles->Create(*isolate->factory()->NewFixedArray(1));
Handle<Object> g2s1 =
- global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
+ global_handles->Create(*isolate->factory()->NewFixedArray(1));
Handle<Object> g2s2 =
- global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
+ global_handles->Create(*isolate->factory()->NewFixedArray(1));
TestRetainedObjectInfo info1;
TestRetainedObjectInfo info2;
@@ -181,20 +181,20 @@ TEST(IterateObjectGroupsOldApi) {
TEST(IterateObjectGroups) {
CcTest::InitializeVM();
- GlobalHandles* global_handles = CcTest::i_isolate()->global_handles();
- Heap* heap = CcTest::heap();
+ Isolate* isolate = CcTest::i_isolate();
+ GlobalHandles* global_handles = isolate->global_handles();
v8::HandleScope handle_scope(CcTest::isolate());
Handle<Object> g1s1 =
- global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
+ global_handles->Create(*isolate->factory()->NewFixedArray(1));
Handle<Object> g1s2 =
- global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
+ global_handles->Create(*isolate->factory()->NewFixedArray(1));
Handle<Object> g2s1 =
- global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
+ global_handles->Create(*isolate->factory()->NewFixedArray(1));
Handle<Object> g2s2 =
- global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
+ global_handles->Create(*isolate->factory()->NewFixedArray(1));
TestRetainedObjectInfo info1;
TestRetainedObjectInfo info2;
@@ -276,25 +276,25 @@ TEST(IterateObjectGroups) {
TEST(ImplicitReferences) {
CcTest::InitializeVM();
- GlobalHandles* global_handles = CcTest::i_isolate()->global_handles();
- Heap* heap = CcTest::heap();
+ Isolate* isolate = CcTest::i_isolate();
+ GlobalHandles* global_handles = isolate->global_handles();
v8::HandleScope handle_scope(CcTest::isolate());
Handle<Object> g1s1 =
- global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
+ global_handles->Create(*isolate->factory()->NewFixedArray(1));
Handle<Object> g1c1 =
- global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
+ global_handles->Create(*isolate->factory()->NewFixedArray(1));
Handle<Object> g1c2 =
- global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
+ global_handles->Create(*isolate->factory()->NewFixedArray(1));
Handle<Object> g2s1 =
- global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
+ global_handles->Create(*isolate->factory()->NewFixedArray(1));
Handle<Object> g2s2 =
- global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
+ global_handles->Create(*isolate->factory()->NewFixedArray(1));
Handle<Object> g2c1 =
- global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
+ global_handles->Create(*isolate->factory()->NewFixedArray(1));
global_handles->SetObjectGroupId(g1s1.location(), UniqueId(1));
global_handles->SetObjectGroupId(g2s1.location(), UniqueId(2));
« no previous file with comments | « src/runtime.cc ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698