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

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

Issue 1281613004: Version 4.4.63.31 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.4
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 5351 matching lines...) Expand 10 before | Expand all | Expand 10 after
5362 } 5362 }
5363 5363
5364 5364
5365 TEST(WeakFixedArray) { 5365 TEST(WeakFixedArray) {
5366 CcTest::InitializeVM(); 5366 CcTest::InitializeVM();
5367 v8::HandleScope scope(CcTest::isolate()); 5367 v8::HandleScope scope(CcTest::isolate());
5368 5368
5369 Handle<HeapNumber> number = CcTest::i_isolate()->factory()->NewHeapNumber(1); 5369 Handle<HeapNumber> number = CcTest::i_isolate()->factory()->NewHeapNumber(1);
5370 Handle<WeakFixedArray> array = WeakFixedArray::Add(Handle<Object>(), number); 5370 Handle<WeakFixedArray> array = WeakFixedArray::Add(Handle<Object>(), number);
5371 array->Remove(number); 5371 array->Remove(number);
5372 array->Compact(); 5372 array->Compact<WeakFixedArray::NullCallback>();
5373 WeakFixedArray::Add(array, number); 5373 WeakFixedArray::Add(array, number);
5374 } 5374 }
5375 5375
5376 5376
5377 TEST(PreprocessStackTrace) { 5377 TEST(PreprocessStackTrace) {
5378 // Do not automatically trigger early GC. 5378 // Do not automatically trigger early GC.
5379 FLAG_gc_interval = -1; 5379 FLAG_gc_interval = -1;
5380 CcTest::InitializeVM(); 5380 CcTest::InitializeVM();
5381 v8::HandleScope scope(CcTest::isolate()); 5381 v8::HandleScope scope(CcTest::isolate());
5382 v8::TryCatch try_catch; 5382 v8::TryCatch try_catch;
(...skipping 15 matching lines...) Expand all
5398 CHECK(pos->IsSmi()); 5398 CHECK(pos->IsSmi());
5399 5399
5400 Handle<JSArray> stack_trace_array = Handle<JSArray>::cast(stack_trace); 5400 Handle<JSArray> stack_trace_array = Handle<JSArray>::cast(stack_trace);
5401 int array_length = Smi::cast(stack_trace_array->length())->value(); 5401 int array_length = Smi::cast(stack_trace_array->length())->value();
5402 for (int i = 0; i < array_length; i++) { 5402 for (int i = 0; i < array_length; i++) {
5403 Handle<Object> element = 5403 Handle<Object> element =
5404 Object::GetElement(isolate, stack_trace, i).ToHandleChecked(); 5404 Object::GetElement(isolate, stack_trace, i).ToHandleChecked();
5405 CHECK(!element->IsCode()); 5405 CHECK(!element->IsCode());
5406 } 5406 }
5407 } 5407 }
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