Commit 08d77cbd authored by ulan@chromium.org's avatar ulan@chromium.org

Fix flaky idle notification test.

Idle notification handler might not free more memory if there was a global GC before or incremental marking is not activated (and it's not worth activating).

BUG=
TEST=cctest/test-api/IdleNotificationWithHint

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ebb75c23
......@@ -13559,21 +13559,24 @@ THREADED_TEST(IdleNotification) {
// Test that idle notification can be handled and eventually returns true.
// This just checks the contract of the IdleNotification() function,
// and does not verify that it does reasonable work.
THREADED_TEST(IdleNotificationWithHint) {
TEST(IdleNotificationWithHint) {
v8::HandleScope scope;
LocalContext env;
CompileRun("function binom(n, m) {"
" var C = [[1]];"
" for (var i = 1; i <= n; ++i) {"
" C[i] = [1];"
" for (var j = 1; j < i; ++j) {"
" C[i][j] = C[i-1][j-1] + C[i-1][j];"
" }"
" C[i][i] = 1;"
" }"
" return C[n][m];"
"};"
"binom(1000, 500)");
{
i::AlwaysAllocateScope always_allocate;
CompileRun("function binom(n, m) {"
" var C = [[1]];"
" for (var i = 1; i <= n; ++i) {"
" C[i] = [1];"
" for (var j = 1; j < i; ++j) {"
" C[i][j] = C[i-1][j-1] + C[i-1][j];"
" }"
" C[i][i] = 1;"
" }"
" return C[n][m];"
"};"
"binom(1000, 500)");
}
bool rv = false;
intptr_t old_size = HEAP->SizeOfObjects();
bool no_idle_work = v8::V8::IdleNotification(10);
......
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