Index: test/cctest/test-compiler.cc |
diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc |
index 5e7935c4abec8cfcafa3e182f986469cce5dbabd..ac08800948ff63481d5083bf060640e73c1aed47 100644 |
--- a/test/cctest/test-compiler.cc |
+++ b/test/cctest/test-compiler.cc |
@@ -355,6 +355,9 @@ TEST(GetScriptLineNumber) { |
// Test that optimized code for different closures is actually shared |
// immediately by the FastNewClosureStub when run in the same context. |
TEST(OptimizedCodeSharing) { |
+ // Skip test if --cache-optimized-code is not activated by default because |
+ // FastNewClosureStub that is baked into the snapshot is incorrect. |
+ if (!FLAG_cache_optimized_code) return; |
FLAG_allow_natives_syntax = true; |
InitializeVM(); |
v8::HandleScope scope; |