Index: test/cctest/test-compiler.cc |
diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc |
index e257f2a2eef5201fae3da3311a8e34664da4777f..57686d0ee5084fd3cd23db05a839267b86f53251 100644 |
--- a/test/cctest/test-compiler.cc |
+++ b/test/cctest/test-compiler.cc |
@@ -385,10 +385,12 @@ TEST(OptimizedCodeSharing1) { |
" return function() { return x; };" |
"}" |
"var closure0 = MakeClosure();" |
+ "var closure1 = MakeClosure();" // We only share optimized code |
+ // if there are at least two closures. |
"%DebugPrint(closure0());" |
"%OptimizeFunctionOnNextCall(closure0);" |
"%DebugPrint(closure0());" |
- "var closure1 = MakeClosure(); closure1();" |
+ "closure1();" |
"var closure2 = MakeClosure(); closure2();"); |
Handle<JSFunction> fun1 = Handle<JSFunction>::cast( |
v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast( |