From b2f6d7843ae99ddec73f3319350875101bdee196 Mon Sep 17 00:00:00 2001 From: "mstarzinger@chromium.org" Date: Tue, 7 May 2013 15:18:01 +0000 Subject: [PATCH] Disable code flushing for native SharedFunctionInfo. R=hpayer@google.com TEST=cctest/test-api/Threading4 Review URL: https://codereview.chromium.org/15018012 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/objects-visiting-inl.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h index 6a64cbf..add247e 100644 --- a/src/objects-visiting-inl.h +++ b/src/objects-visiting-inl.h @@ -571,6 +571,12 @@ bool StaticMarkingVisitor::IsFlushable( return false; } + // If this is a native function we do not flush the code because %SetCode + // breaks the one-to-one relation between SharedFunctionInfo and Code. + if (shared_info->native()) { + return false; + } + if (FLAG_age_code) { return shared_info->code()->IsOld(); } else { -- 2.7.4