Skip test for optimized code sharing if flag is disabled by default.

R=mstarzinger@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10642019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yangguo@chromium.org 2012-06-22 12:47:11 +00:00
parent a28c919c7b
commit 9a0069b639

View File

@ -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;