Index: src/objects-visiting-inl.h |
diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h |
index 6a64cbf802af10184262301df3adcaf3c6a963ac..add247ea45cda0e3f7c97de7e8b24f9a8f632106 100644 |
--- a/src/objects-visiting-inl.h |
+++ b/src/objects-visiting-inl.h |
@@ -571,6 +571,12 @@ bool StaticMarkingVisitor<StaticVisitor>::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 { |