Index: src/runtime-profiler.cc |
diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc |
index 1efc6ef620eb64a1543f7551d2d0f143a4a7847c..d7792aceaede3d5d72f6b3dc821d3845b758a3f1 100644 |
--- a/src/runtime-profiler.cc |
+++ b/src/runtime-profiler.cc |
@@ -134,6 +134,7 @@ void PendingListNode::WeakCallback(v8::Persistent<v8::Value>, void* data) { |
static bool IsOptimizable(JSFunction* function) { |
+ if (Heap::InNewSpace(function)) return false; |
Code* code = function->code(); |
return code->kind() == Code::FUNCTION && code->optimizable(); |
} |