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

Unified Diff: test/cctest/test-debug.cc

Issue 6639024: Get rid of distinction between below- and above-watermark in page allocation.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: test/cctest/test-debug.cc
===================================================================
--- test/cctest/test-debug.cc (revision 7100)
+++ test/cctest/test-debug.cc (working copy)
@@ -414,12 +414,12 @@
CHECK_EQ(NULL, Debug::debug_info_list_);
// Collect garbage to ensure weak handles are cleared.
- Heap::CollectAllGarbage(false);
- Heap::CollectAllGarbage(false);
+ Heap::CollectAllGarbage(i::Heap::kNoGCFlags);
+ Heap::CollectAllGarbage(i::Heap::kSweepPreciselyMask);
// Iterate the head and check that there are no debugger related objects left.
HeapIterator iterator;
- for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
+ for (HeapObject* obj = iterator.Next(); obj != NULL; obj = iterator.Next()) {
CHECK(!obj->IsDebugInfo());
CHECK(!obj->IsBreakPointInfo());
@@ -908,7 +908,7 @@
Heap::CollectGarbage(v8::internal::NEW_SPACE);
} else {
// Mark sweep compact.
- Heap::CollectAllGarbage(true);
+ Heap::CollectAllGarbage(Heap::kForceCompactionMask);
}
}
}
@@ -1357,7 +1357,7 @@
// and make sure that the break point survives.
static void CallAndGC(v8::Local<v8::Object> recv,
v8::Local<v8::Function> f,
- bool force_compaction) {
+ int gc_flags) {
break_point_hit_count = 0;
for (int i = 0; i < 3; i++) {
@@ -1371,14 +1371,14 @@
CHECK_EQ(2 + i * 3, break_point_hit_count);
// Mark sweep (and perhaps compact) and call function.
- Heap::CollectAllGarbage(force_compaction);
+ Heap::CollectAllGarbage(gc_flags);
f->Call(recv, 0, NULL);
CHECK_EQ(3 + i * 3, break_point_hit_count);
}
}
-static void TestBreakPointSurviveGC(bool force_compaction) {
+static void TestBreakPointSurviveGC(int gc_flags) {
break_point_hit_count = 0;
v8::HandleScope scope;
DebugLocalContext env;
@@ -1394,7 +1394,7 @@
foo = CompileFunction(&env, "function foo(){bar=0;}", "foo");
SetBreakPoint(foo, 0);
}
- CallAndGC(env->Global(), foo, force_compaction);
+ CallAndGC(env->Global(), foo, gc_flags);
// Test IC load break point with garbage collection.
{
@@ -1403,7 +1403,7 @@
foo = CompileFunction(&env, "bar=1;function foo(){var x=bar;}", "foo");
SetBreakPoint(foo, 0);
}
- CallAndGC(env->Global(), foo, force_compaction);
+ CallAndGC(env->Global(), foo, gc_flags);
// Test IC call break point with garbage collection.
{
@@ -1414,7 +1414,7 @@
"foo");
SetBreakPoint(foo, 0);
}
- CallAndGC(env->Global(), foo, force_compaction);
+ CallAndGC(env->Global(), foo, gc_flags);
// Test return break point with garbage collection.
{
@@ -1423,7 +1423,7 @@
foo = CompileFunction(&env, "function foo(){}", "foo");
SetBreakPoint(foo, 0);
}
- CallAndGC(env->Global(), foo, force_compaction);
+ CallAndGC(env->Global(), foo, gc_flags);
// Test non IC break point with garbage collection.
{
@@ -1432,7 +1432,7 @@
foo = CompileFunction(&env, "function foo(){var bar=0;}", "foo");
SetBreakPoint(foo, 0);
}
- CallAndGC(env->Global(), foo, force_compaction);
+ CallAndGC(env->Global(), foo, gc_flags);
v8::Debug::SetDebugEventListener(NULL);
@@ -1442,8 +1442,8 @@
// Test that a break point can be set at a return store location.
TEST(BreakPointSurviveGC) {
- TestBreakPointSurviveGC(false);
- TestBreakPointSurviveGC(true);
+ TestBreakPointSurviveGC(Heap::kNoGCFlags);
+ TestBreakPointSurviveGC(Heap::kForceCompactionMask);
}
@@ -2198,7 +2198,7 @@
}
f = v8::Local<v8::Function>::Cast(env->Global()->Get(v8::String::New("f")));
- Heap::CollectAllGarbage(false);
+ Heap::CollectAllGarbage(Heap::kNoGCFlags);
SetScriptBreakPointByNameFromJS("test.html", 3, -1);
@@ -6385,7 +6385,7 @@
// Do garbage collection to ensure that only the script in this test will be
// collected afterwards.
- Heap::CollectAllGarbage(false);
+ Heap::CollectAllGarbage(Heap::kNoGCFlags);
script_collected_count = 0;
v8::Debug::SetDebugEventListener(DebugEventScriptCollectedEvent,
@@ -6397,7 +6397,7 @@
// Do garbage collection to collect the script above which is no longer
// referenced.
- Heap::CollectAllGarbage(false);
+ Heap::CollectAllGarbage(Heap::kNoGCFlags);
CHECK_EQ(2, script_collected_count);
@@ -6432,7 +6432,7 @@
// Do garbage collection to ensure that only the script in this test will be
// collected afterwards.
- Heap::CollectAllGarbage(false);
+ Heap::CollectAllGarbage(Heap::kNoGCFlags);
v8::Debug::SetMessageHandler2(ScriptCollectedMessageHandler);
{
@@ -6443,7 +6443,7 @@
// Do garbage collection to collect the script above which is no longer
// referenced.
- Heap::CollectAllGarbage(false);
+ Heap::CollectAllGarbage(Heap::kNoGCFlags);
CHECK_EQ(2, script_collected_message_count);

Powered by Google App Engine
This is Rietveld 408576698