Revision f230a1cf deps/v8/test/cctest/test-global-handles.cc

View differences:

deps/v8/test/cctest/test-global-handles.cc
86 86

  
87 87
TEST(IterateObjectGroupsOldApi) {
88 88
  CcTest::InitializeVM();
89
  GlobalHandles* global_handles = Isolate::Current()->global_handles();
90

  
89
  GlobalHandles* global_handles = CcTest::i_isolate()->global_handles();
90
  Heap* heap = CcTest::heap();
91 91
  v8::HandleScope handle_scope(CcTest::isolate());
92 92

  
93 93
  Handle<Object> g1s1 =
94
      global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
94
      global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
95 95
  Handle<Object> g1s2 =
96
      global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
96
      global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
97 97

  
98 98
  Handle<Object> g2s1 =
99
      global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
99
      global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
100 100
  Handle<Object> g2s2 =
101
      global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
101
      global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
102 102

  
103 103
  TestRetainedObjectInfo info1;
104 104
  TestRetainedObjectInfo info2;
......
181 181

  
182 182
TEST(IterateObjectGroups) {
183 183
  CcTest::InitializeVM();
184
  GlobalHandles* global_handles = Isolate::Current()->global_handles();
184
  GlobalHandles* global_handles = CcTest::i_isolate()->global_handles();
185
  Heap* heap = CcTest::heap();
185 186

  
186 187
  v8::HandleScope handle_scope(CcTest::isolate());
187 188

  
188 189
  Handle<Object> g1s1 =
189
      global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
190
      global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
190 191
  Handle<Object> g1s2 =
191
      global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
192
      global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
192 193

  
193 194
  Handle<Object> g2s1 =
194
      global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
195
      global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
195 196
  Handle<Object> g2s2 =
196
    global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
197
    global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
197 198

  
198 199
  TestRetainedObjectInfo info1;
199 200
  TestRetainedObjectInfo info2;
......
275 276

  
276 277
TEST(ImplicitReferences) {
277 278
  CcTest::InitializeVM();
278
  GlobalHandles* global_handles = Isolate::Current()->global_handles();
279
  GlobalHandles* global_handles = CcTest::i_isolate()->global_handles();
280
  Heap* heap = CcTest::heap();
279 281

  
280 282
  v8::HandleScope handle_scope(CcTest::isolate());
281 283

  
282 284
  Handle<Object> g1s1 =
283
      global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
285
      global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
284 286
  Handle<Object> g1c1 =
285
      global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
287
      global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
286 288
  Handle<Object> g1c2 =
287
      global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
289
      global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
288 290

  
289 291

  
290 292
  Handle<Object> g2s1 =
291
      global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
293
      global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
292 294
  Handle<Object> g2s2 =
293
    global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
295
    global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
294 296
  Handle<Object> g2c1 =
295
    global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
297
    global_handles->Create(heap->AllocateFixedArray(1)->ToObjectChecked());
296 298

  
297 299
  global_handles->SetObjectGroupId(g1s1.location(), UniqueId(1));
298 300
  global_handles->SetObjectGroupId(g2s1.location(), UniqueId(2));
......
319 321

  
320 322
TEST(EternalHandles) {
321 323
  CcTest::InitializeVM();
322
  Isolate* isolate = Isolate::Current();
324
  Isolate* isolate = CcTest::i_isolate();
323 325
  v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate);
324 326
  EternalHandles* eternal_handles = isolate->eternal_handles();
325 327

  

Also available in: Unified diff