CHECK(source->IsExternal());
CHECK_EQ(resource,
static_cast<TestResource*>(source->GetExternalStringResource()));
- v8::internal::Heap::CollectAllGarbage();
+ v8::internal::Heap::CollectAllGarbage(false);
CHECK_EQ(0, TestResource::dispose_count);
}
v8::internal::CompilationCache::Clear();
- v8::internal::Heap::CollectAllGarbage();
+ v8::internal::Heap::CollectAllGarbage(false);
CHECK_EQ(1, TestResource::dispose_count);
}
Local<Value> value = script->Run();
CHECK(value->IsNumber());
CHECK_EQ(7, value->Int32Value());
- v8::internal::Heap::CollectAllGarbage();
+ v8::internal::Heap::CollectAllGarbage(false);
CHECK_EQ(0, TestAsciiResource::dispose_count);
}
v8::internal::CompilationCache::Clear();
- v8::internal::Heap::CollectAllGarbage();
+ v8::internal::Heap::CollectAllGarbage(false);
CHECK_EQ(1, TestAsciiResource::dispose_count);
}
Local<Value> value = script->Run();
CHECK(value->IsNumber());
CHECK_EQ(7, value->Int32Value());
- v8::internal::Heap::CollectAllGarbage();
+ v8::internal::Heap::CollectAllGarbage(false);
CHECK_EQ(0, TestResource::dispose_count);
}
v8::internal::CompilationCache::Clear();
- v8::internal::Heap::CollectAllGarbage();
+ v8::internal::Heap::CollectAllGarbage(false);
CHECK_EQ(1, TestResource::dispose_count);
}
Local<Value> value = script->Run();
CHECK(value->IsNumber());
CHECK_EQ(7, value->Int32Value());
- v8::internal::Heap::CollectAllGarbage();
+ v8::internal::Heap::CollectAllGarbage(false);
CHECK_EQ(0, TestAsciiResource::dispose_count);
}
v8::internal::CompilationCache::Clear();
- v8::internal::Heap::CollectAllGarbage();
+ v8::internal::Heap::CollectAllGarbage(false);
CHECK_EQ(1, TestAsciiResource::dispose_count);
}
i::Handle<i::String> isymbol = i::Factory::SymbolFromString(istring);
CHECK(isymbol->IsSymbol());
}
- i::Heap::CollectAllGarbage();
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
+ i::Heap::CollectAllGarbage(false);
}
i::Handle<i::String> isymbol = i::Factory::SymbolFromString(istring);
CHECK(isymbol->IsSymbol());
}
- i::Heap::CollectAllGarbage();
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
+ i::Heap::CollectAllGarbage(false);
}
// Check reading and writing aligned pointers.
obj->SetPointerInInternalField(0, aligned);
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
CHECK_EQ(aligned, obj->GetPointerFromInternalField(0));
// Check reading and writing unaligned pointers.
obj->SetPointerInInternalField(0, unaligned);
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
CHECK_EQ(unaligned, obj->GetPointerFromInternalField(0));
delete[] data;
// Ensure that the test starts with an fresh heap to test whether the hash
// code is based on the address.
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
Local<v8::Object> obj = v8::Object::New();
int hash = obj->GetIdentityHash();
int hash1 = obj->GetIdentityHash();
// objects should not be assigned the same hash code. If the test below fails
// the random number generator should be evaluated.
CHECK_NE(hash, hash2);
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
int hash3 = v8::Object::New()->GetIdentityHash();
// Make sure that the identity hash is not based on the initial address of
// the object alone. If the test below fails the random number generator
v8::Local<v8::String> empty = v8_str("");
v8::Local<v8::String> prop_name = v8_str("prop_name");
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
// Make sure delete of a non-existent hidden value works
CHECK(obj->DeleteHiddenValue(key));
CHECK(obj->SetHiddenValue(key, v8::Integer::New(2002)));
CHECK_EQ(2002, obj->GetHiddenValue(key)->Int32Value());
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
// Make sure we do not find the hidden property.
CHECK(!obj->Has(empty));
CHECK_EQ(2002, obj->GetHiddenValue(key)->Int32Value());
CHECK_EQ(2003, obj->Get(empty)->Int32Value());
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
// Add another property and delete it afterwards to force the object in
// slow case.
CHECK(obj->Delete(prop_name));
CHECK_EQ(2002, obj->GetHiddenValue(key)->Int32Value());
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
CHECK(obj->DeleteHiddenValue(key));
CHECK(obj->GetHiddenValue(key).IsEmpty());
}
// The whole goal of this interceptor is to cause a GC during local property
// lookup.
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
i::FLAG_always_compact = saved_always_compact;
return v8::Handle<Value>();
}
CHECK_EQ(v8::Integer::New(3), args[2]);
CHECK_EQ(v8::Undefined(), args[3]);
v8::HandleScope scope;
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
return v8::Undefined();
}
Local<String> name,
const AccessorInfo& info) {
ApiTestFuzzer::Fuzz();
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
return v8::Handle<Value>();
}
// the first garbage collection but some of the maps have already
// been marked at that point. Therefore some of the maps are not
// collected until the second garbage collection.
- v8::internal::Heap::CollectAllGarbage();
- v8::internal::Heap::CollectAllGarbage();
+ v8::internal::Heap::CollectAllGarbage(false);
+ v8::internal::Heap::CollectAllGarbage(false);
v8::internal::HeapIterator it;
while (it.has_next()) {
v8::internal::HeapObject* object = it.next();
// weak callback of the first handle would be able to 'reallocate' it.
handle1.MakeWeak(NULL, NewPersistentHandleCallback);
handle2.Dispose();
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
}
void DisposeAndForceGcCallback(v8::Persistent<v8::Value> handle, void*) {
to_be_disposed.Dispose();
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
}
}
handle1.MakeWeak(NULL, DisposeAndForceGcCallback);
to_be_disposed = handle2;
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
}
{
v8::Locker lock;
// TODO(lrn): Perhaps create some garbage before collecting.
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
gc_count_++;
}
i::OS::Sleep(1);
while (gc_during_apply_ < kRequiredGCs) {
{
v8::Locker lock;
- i::Heap::CollectAllGarbage();
+ i::Heap::CollectAllGarbage(false);
gc_count_++;
}
i::OS::Sleep(1);
uint8_t* pixel_data = reinterpret_cast<uint8_t*>(malloc(kElementCount));
i::Handle<i::PixelArray> pixels = i::Factory::NewPixelArray(kElementCount,
pixel_data);
- i::Heap::CollectAllGarbage(); // Force GC to trigger verification.
+ i::Heap::CollectAllGarbage(false); // Force GC to trigger verification.
for (int i = 0; i < kElementCount; i++) {
pixels->set(i, i);
}
- i::Heap::CollectAllGarbage(); // Force GC to trigger verification.
+ i::Heap::CollectAllGarbage(false); // Force GC to trigger verification.
for (int i = 0; i < kElementCount; i++) {
CHECK_EQ(i, pixels->get(i));
CHECK_EQ(i, pixel_data[i]);
CHECK_EQ(NULL, Debug::debug_info_list_);
// Collect garbage to ensure weak handles are cleared.
- Heap::CollectAllGarbage();
- Heap::CollectAllGarbage();
+ Heap::CollectAllGarbage(false);
+ Heap::CollectAllGarbage(false);
// Iterate the head and check that there are no debugger related objects left.
HeapIterator iterator;
Heap::CollectGarbage(0, v8::internal::NEW_SPACE);
} else {
// Mark sweep (and perhaps compact).
- Heap::CollectAllGarbage();
+ Heap::CollectAllGarbage(false);
}
}
}
CHECK_EQ(2 + i * 3, break_point_hit_count);
// Mark sweep (and perhaps compact) and call function.
- Heap::CollectAllGarbage();
+ Heap::CollectAllGarbage(false);
f->Call(recv, 0, NULL);
CHECK_EQ(3 + i * 3, break_point_hit_count);
}
// Do garbage collection to ensure that only the script in this test will be
// collected afterwards.
- Heap::CollectAllGarbage();
+ Heap::CollectAllGarbage(false);
script_collected_count = 0;
v8::Debug::SetDebugEventListener(DebugEventScriptCollectedEvent,
// Do garbage collection to collect the script above which is no longer
// referenced.
- Heap::CollectAllGarbage();
+ Heap::CollectAllGarbage(false);
CHECK_EQ(2, script_collected_count);
// Do garbage collection to ensure that only the script in this test will be
// collected afterwards.
- Heap::CollectAllGarbage();
+ Heap::CollectAllGarbage(false);
v8::Debug::SetMessageHandler2(ScriptCollectedMessageHandler);
{
// Do garbage collection to collect the script above which is no longer
// referenced.
- Heap::CollectAllGarbage();
+ Heap::CollectAllGarbage(false);
CHECK_EQ(2, script_collected_message_count);