Index: test/cctest/test-random.cc |
diff --git a/test/cctest/test-random.cc b/test/cctest/test-random.cc |
index 477daf11282a40733594f3671ef387a2cbfc9067..7a1d9e7a1f661681605a2077f8e3fee004fbb517 100644 |
--- a/test/cctest/test-random.cc |
+++ b/test/cctest/test-random.cc |
@@ -91,7 +91,7 @@ TEST(CrankshaftRandom) { |
// Optimize function. |
Execution::Call(fun, global, 0, NULL, &has_pending_exception); |
Execution::Call(fun, global, 0, NULL, &has_pending_exception); |
- fun->MarkForLazyRecompilation(); |
+ if (!fun->IsOptimized()) fun->MarkForLazyRecompilation(); |
// Test with some random values. |
TestSeeds(fun, context, 0xC0C0AFFE, 0x31415926); |