Commit f736ed3f authored by mike@belshe.com's avatar mike@belshe.com

Forgot to change API signature for V8 tests.

BUG=none
TEST=none

TBR=ager

Review URL: http://codereview.chromium.org/174386

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2749 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6f3c5046
......@@ -462,11 +462,11 @@ THREADED_TEST(ScriptUsingStringResource) {
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);
}
......@@ -483,11 +483,11 @@ THREADED_TEST(ScriptUsingAsciiStringResource) {
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);
}
......@@ -505,11 +505,11 @@ THREADED_TEST(ScriptMakingExternalString) {
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);
}
......@@ -528,11 +528,11 @@ THREADED_TEST(ScriptMakingExternalAsciiString) {
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);
}
......@@ -550,8 +550,8 @@ THREADED_TEST(UsingExternalString) {
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);
}
......@@ -568,8 +568,8 @@ THREADED_TEST(UsingExternalAsciiString) {
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);
}
......@@ -1333,12 +1333,12 @@ THREADED_TEST(InternalFieldsNativePointers) {
// 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;
......@@ -1351,7 +1351,7 @@ THREADED_TEST(IdentityHash) {
// 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();
......@@ -1361,7 +1361,7 @@ THREADED_TEST(IdentityHash) {
// 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
......@@ -1381,7 +1381,7 @@ THREADED_TEST(HiddenProperties) {
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));
......@@ -1391,7 +1391,7 @@ THREADED_TEST(HiddenProperties) {
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));
......@@ -1402,7 +1402,7 @@ THREADED_TEST(HiddenProperties) {
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.
......@@ -1413,7 +1413,7 @@ THREADED_TEST(HiddenProperties) {
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());
......@@ -1429,7 +1429,7 @@ static v8::Handle<Value> InterceptorForHiddenProperties(
}
// 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>();
}
......@@ -2982,7 +2982,7 @@ static v8::Handle<Value> ArgumentsTestCallback(const v8::Arguments& args) {
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();
}
......@@ -4960,7 +4960,7 @@ static v8::Handle<Value> InterceptorHasOwnPropertyGetterGC(
Local<String> name,
const AccessorInfo& info) {
ApiTestFuzzer::Fuzz();
i::Heap::CollectAllGarbage();
i::Heap::CollectAllGarbage(false);
return v8::Handle<Value>();
}
......@@ -6165,8 +6165,8 @@ static int GetSurvivingGlobalObjectsCount() {
// 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();
......@@ -6242,7 +6242,7 @@ THREADED_TEST(NewPersistentHandleFromWeakCallback) {
// 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);
}
......@@ -6250,7 +6250,7 @@ v8::Persistent<v8::Object> to_be_disposed;
void DisposeAndForceGcCallback(v8::Persistent<v8::Value> handle, void*) {
to_be_disposed.Dispose();
i::Heap::CollectAllGarbage();
i::Heap::CollectAllGarbage(false);
}
......@@ -6265,7 +6265,7 @@ THREADED_TEST(DoNotUseDeletedNodesInSecondLevelGc) {
}
handle1.MakeWeak(NULL, DisposeAndForceGcCallback);
to_be_disposed = handle2;
i::Heap::CollectAllGarbage();
i::Heap::CollectAllGarbage(false);
}
......@@ -6842,7 +6842,7 @@ class RegExpInterruptTest {
{
v8::Locker lock;
// TODO(lrn): Perhaps create some garbage before collecting.
i::Heap::CollectAllGarbage();
i::Heap::CollectAllGarbage(false);
gc_count_++;
}
i::OS::Sleep(1);
......@@ -6963,7 +6963,7 @@ class ApplyInterruptTest {
while (gc_during_apply_ < kRequiredGCs) {
{
v8::Locker lock;
i::Heap::CollectAllGarbage();
i::Heap::CollectAllGarbage(false);
gc_count_++;
}
i::OS::Sleep(1);
......@@ -7680,11 +7680,11 @@ THREADED_TEST(PixelArray) {
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]);
......
......@@ -414,8 +414,8 @@ void CheckDebuggerUnloaded(bool check_functions) {
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;
......@@ -843,7 +843,7 @@ static void DebugEventBreakPointCollectGarbage(
Heap::CollectGarbage(0, v8::internal::NEW_SPACE);
} else {
// Mark sweep (and perhaps compact).
Heap::CollectAllGarbage();
Heap::CollectAllGarbage(false);
}
}
}
......@@ -1206,7 +1206,7 @@ static void CallAndGC(v8::Local<v8::Object> recv, v8::Local<v8::Function> f) {
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);
}
......@@ -5094,7 +5094,7 @@ TEST(ScriptCollectedEvent) {
// 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,
......@@ -5106,7 +5106,7 @@ TEST(ScriptCollectedEvent) {
// Do garbage collection to collect the script above which is no longer
// referenced.
Heap::CollectAllGarbage();
Heap::CollectAllGarbage(false);
CHECK_EQ(2, script_collected_count);
......@@ -5141,7 +5141,7 @@ TEST(ScriptCollectedEventContext) {
// 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);
{
......@@ -5152,7 +5152,7 @@ TEST(ScriptCollectedEventContext) {
// 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);
......
......@@ -685,7 +685,7 @@ TEST(EquivalenceOfLoggingAndTraversal) {
" obj.test =\n"
" (function a(j) { return function b() { return j; } })(100);\n"
"})(this);");
i::Heap::CollectAllGarbage();
i::Heap::CollectAllGarbage(false);
EmbeddedVector<char, 204800> buffer;
int log_size;
......
......@@ -480,7 +480,7 @@ TEST(Regress9746) {
// symbol entry in the symbol table because it is used by the script
// kept alive by the weak wrapper. Make sure we don't destruct the
// external string.
Heap::CollectAllGarbage();
Heap::CollectAllGarbage(false);
CHECK(!resource_destructed);
{
......@@ -499,7 +499,7 @@ TEST(Regress9746) {
// Forcing another garbage collection should let us get rid of the
// slice from the symbol table. The external string remains in the
// heap until the next GC.
Heap::CollectAllGarbage();
Heap::CollectAllGarbage(false);
CHECK(!resource_destructed);
v8::HandleScope scope;
Handle<String> key_string = Factory::NewStringFromAscii(key_vector);
......@@ -508,7 +508,7 @@ TEST(Regress9746) {
// Forcing yet another garbage collection must allow us to finally
// get rid of the external string.
Heap::CollectAllGarbage();
Heap::CollectAllGarbage(false);
CHECK(resource_destructed);
delete[] source;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment