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

Side by Side Diff: test/cctest/test-heap.cc

Issue 1282143003: Version 4.5.103.22 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.5
Patch Set: Created 5 years, 4 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
« no previous file with comments | « src/snapshot/serialize.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 5634 matching lines...) Expand 10 before | Expand all | Expand 10 after
5645 } 5645 }
5646 5646
5647 5647
5648 TEST(WeakFixedArray) { 5648 TEST(WeakFixedArray) {
5649 CcTest::InitializeVM(); 5649 CcTest::InitializeVM();
5650 v8::HandleScope scope(CcTest::isolate()); 5650 v8::HandleScope scope(CcTest::isolate());
5651 5651
5652 Handle<HeapNumber> number = CcTest::i_isolate()->factory()->NewHeapNumber(1); 5652 Handle<HeapNumber> number = CcTest::i_isolate()->factory()->NewHeapNumber(1);
5653 Handle<WeakFixedArray> array = WeakFixedArray::Add(Handle<Object>(), number); 5653 Handle<WeakFixedArray> array = WeakFixedArray::Add(Handle<Object>(), number);
5654 array->Remove(number); 5654 array->Remove(number);
5655 array->Compact(); 5655 array->Compact<WeakFixedArray::NullCallback>();
5656 WeakFixedArray::Add(array, number); 5656 WeakFixedArray::Add(array, number);
5657 } 5657 }
5658 5658
5659 5659
5660 TEST(PreprocessStackTrace) { 5660 TEST(PreprocessStackTrace) {
5661 // Do not automatically trigger early GC. 5661 // Do not automatically trigger early GC.
5662 FLAG_gc_interval = -1; 5662 FLAG_gc_interval = -1;
5663 CcTest::InitializeVM(); 5663 CcTest::InitializeVM();
5664 v8::HandleScope scope(CcTest::isolate()); 5664 v8::HandleScope scope(CcTest::isolate());
5665 v8::TryCatch try_catch(CcTest::isolate()); 5665 v8::TryCatch try_catch(CcTest::isolate());
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
6048 array->address(), 6048 array->address(),
6049 array->address() + array->Size()); 6049 array->address() + array->Size());
6050 DCHECK(reinterpret_cast<void*>(buffer->Get(1)) == 6050 DCHECK(reinterpret_cast<void*>(buffer->Get(1)) ==
6051 HeapObject::RawField(heap->empty_fixed_array(), 6051 HeapObject::RawField(heap->empty_fixed_array(),
6052 FixedArrayBase::kLengthOffset)); 6052 FixedArrayBase::kLengthOffset));
6053 DCHECK(reinterpret_cast<void*>(buffer->Get(2)) == 6053 DCHECK(reinterpret_cast<void*>(buffer->Get(2)) ==
6054 HeapObject::RawField(heap->empty_fixed_array(), 6054 HeapObject::RawField(heap->empty_fixed_array(),
6055 FixedArrayBase::kLengthOffset)); 6055 FixedArrayBase::kLengthOffset));
6056 delete buffer; 6056 delete buffer;
6057 } 6057 }
OLDNEW
« no previous file with comments | « src/snapshot/serialize.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698