Commit cda5b1a5 authored by ulan@chromium.org's avatar ulan@chromium.org

Use the old handler for low frequency idle notifications.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e9688608
......@@ -4541,9 +4541,10 @@ void Heap::EnsureHeapIsIterable() {
bool Heap::IdleNotification(int hint) {
if (hint >= 1000) return IdleGlobalGC();
if (contexts_disposed_ > 0 || !FLAG_incremental_marking ||
FLAG_expose_gc || Serializer::enabled()) {
return hint < 1000 ? true : IdleGlobalGC();
return true;
}
// By doing small chunks of GC work in each IdleNotification,
......
......@@ -13454,16 +13454,12 @@ THREADED_TEST(IdleNotification) {
"};"
"binom(1000, 500)");
bool rv = false;
intptr_t old_size = HEAP->SizeOfObjects();
bool no_idle_work = v8::V8::IdleNotification();
for (int i = 0; i < 100; i++) {
rv = v8::V8::IdleNotification();
if (rv)
break;
}
CHECK(rv == true);
intptr_t new_size = HEAP->SizeOfObjects();
CHECK(no_idle_work || new_size < 3 * old_size / 4);
}
// Test that idle notification can be handled and eventually returns true.
......
......@@ -1312,8 +1312,8 @@ TEST(IdleNotificationAdvancesIncrementalMarking) {
CompileRun(source);
}
intptr_t old_size = HEAP->SizeOfObjects();
bool no_idle_work = v8::V8::IdleNotification();
while (!v8::V8::IdleNotification()) ;
bool no_idle_work = v8::V8::IdleNotification(900);
while (!v8::V8::IdleNotification(900)) ;
intptr_t new_size = HEAP->SizeOfObjects();
CHECK(no_idle_work || new_size < 3 * old_size / 4);
}
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