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

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

Issue 9173007: Fix flaky idle notification test. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use always allocate scope and not threading test Created 8 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 0c191c34c810109d6fa15e115803e9478ff413cc..cf1dccf0b94a4cbcb4e9be58fed7840388b1491a 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698