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

Side by Side Diff: test/cctest/test-global-handles.cc

Issue 144313017: Make LeakSanitizer happy, part 2. Fixed register usage on the way. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-assembler-x64.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 ASSERT(implicit_refs->length() == 2); 309 ASSERT(implicit_refs->length() == 2);
310 ASSERT(implicit_refs->at(0)->parent == 310 ASSERT(implicit_refs->at(0)->parent ==
311 reinterpret_cast<HeapObject**>(g1s1.location())); 311 reinterpret_cast<HeapObject**>(g1s1.location()));
312 ASSERT(implicit_refs->at(0)->length == 2); 312 ASSERT(implicit_refs->at(0)->length == 2);
313 ASSERT(implicit_refs->at(0)->children[0] == g1c1.location()); 313 ASSERT(implicit_refs->at(0)->children[0] == g1c1.location());
314 ASSERT(implicit_refs->at(0)->children[1] == g1c2.location()); 314 ASSERT(implicit_refs->at(0)->children[1] == g1c2.location());
315 ASSERT(implicit_refs->at(1)->parent == 315 ASSERT(implicit_refs->at(1)->parent ==
316 reinterpret_cast<HeapObject**>(g2s1.location())); 316 reinterpret_cast<HeapObject**>(g2s1.location()));
317 ASSERT(implicit_refs->at(1)->length == 1); 317 ASSERT(implicit_refs->at(1)->length == 1);
318 ASSERT(implicit_refs->at(1)->children[0] == g2c1.location()); 318 ASSERT(implicit_refs->at(1)->children[0] == g2c1.location());
319 global_handles->RemoveObjectGroups();
320 global_handles->RemoveImplicitRefGroups();
319 } 321 }
320 322
321 323
322 TEST(EternalHandles) { 324 TEST(EternalHandles) {
323 CcTest::InitializeVM(); 325 CcTest::InitializeVM();
324 Isolate* isolate = CcTest::i_isolate(); 326 Isolate* isolate = CcTest::i_isolate();
325 v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate); 327 v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate);
326 EternalHandles* eternal_handles = isolate->eternal_handles(); 328 EternalHandles* eternal_handles = isolate->eternal_handles();
327 329
328 // Create a number of handles that will not be on a block boundary 330 // Create a number of handles that will not be on a block boundary
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 { 373 {
372 HandleScope scope(isolate); 374 HandleScope scope(isolate);
373 v8::Local<v8::Object> object = v8::Object::New(v8_isolate); 375 v8::Local<v8::Object> object = v8::Object::New(v8_isolate);
374 v8::Eternal<v8::Object> eternal(v8_isolate, object); 376 v8::Eternal<v8::Object> eternal(v8_isolate, object);
375 CHECK(!eternal.IsEmpty()); 377 CHECK(!eternal.IsEmpty());
376 CHECK(object == eternal.Get(v8_isolate)); 378 CHECK(object == eternal.Get(v8_isolate));
377 } 379 }
378 380
379 CHECK_EQ(2*kArrayLength + 1, eternal_handles->NumberOfHandles()); 381 CHECK_EQ(2*kArrayLength + 1, eternal_handles->NumberOfHandles());
380 } 382 }
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-x64.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698