| OLD | NEW |
| 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 5936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5947 } | 5947 } |
| 5948 | 5948 |
| 5949 | 5949 |
| 5950 TEST(WeakFixedArray) { | 5950 TEST(WeakFixedArray) { |
| 5951 CcTest::InitializeVM(); | 5951 CcTest::InitializeVM(); |
| 5952 v8::HandleScope scope(CcTest::isolate()); | 5952 v8::HandleScope scope(CcTest::isolate()); |
| 5953 | 5953 |
| 5954 Handle<HeapNumber> number = CcTest::i_isolate()->factory()->NewHeapNumber(1); | 5954 Handle<HeapNumber> number = CcTest::i_isolate()->factory()->NewHeapNumber(1); |
| 5955 Handle<WeakFixedArray> array = WeakFixedArray::Add(Handle<Object>(), number); | 5955 Handle<WeakFixedArray> array = WeakFixedArray::Add(Handle<Object>(), number); |
| 5956 array->Remove(number); | 5956 array->Remove(number); |
| 5957 array->Compact(); | 5957 array->Compact<WeakFixedArray::NullCallback>(); |
| 5958 WeakFixedArray::Add(array, number); | 5958 WeakFixedArray::Add(array, number); |
| 5959 } | 5959 } |
| 5960 | 5960 |
| 5961 | 5961 |
| 5962 TEST(PreprocessStackTrace) { | 5962 TEST(PreprocessStackTrace) { |
| 5963 // Do not automatically trigger early GC. | 5963 // Do not automatically trigger early GC. |
| 5964 FLAG_gc_interval = -1; | 5964 FLAG_gc_interval = -1; |
| 5965 CcTest::InitializeVM(); | 5965 CcTest::InitializeVM(); |
| 5966 v8::HandleScope scope(CcTest::isolate()); | 5966 v8::HandleScope scope(CcTest::isolate()); |
| 5967 v8::TryCatch try_catch(CcTest::isolate()); | 5967 v8::TryCatch try_catch(CcTest::isolate()); |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6377 | 6377 |
| 6378 PrintF("Context size : %d bytes\n", measure.Size()); | 6378 PrintF("Context size : %d bytes\n", measure.Size()); |
| 6379 PrintF("Context object count: %d\n", measure.Count()); | 6379 PrintF("Context object count: %d\n", measure.Count()); |
| 6380 | 6380 |
| 6381 CHECK_LE(1000, measure.Count()); | 6381 CHECK_LE(1000, measure.Count()); |
| 6382 CHECK_LE(50000, measure.Size()); | 6382 CHECK_LE(50000, measure.Size()); |
| 6383 | 6383 |
| 6384 CHECK_LE(measure.Count(), count_upper_limit); | 6384 CHECK_LE(measure.Count(), count_upper_limit); |
| 6385 CHECK_LE(measure.Size(), size_upper_limit); | 6385 CHECK_LE(measure.Size(), size_upper_limit); |
| 6386 } | 6386 } |
| OLD | NEW |