Index: src/crankshaft/lithium-codegen.cc |
diff --git a/src/crankshaft/lithium-codegen.cc b/src/crankshaft/lithium-codegen.cc |
index 956966035725895fead3d59ad3de988051f15f09..71dba3e47b454c6620389a4223bb18818659cbb2 100644 |
--- a/src/crankshaft/lithium-codegen.cc |
+++ b/src/crankshaft/lithium-codegen.cc |
@@ -168,7 +168,9 @@ void LCodeGenBase::Comment(const char* format, ...) { |
void LCodeGenBase::DeoptComment(const Deoptimizer::DeoptInfo& deopt_info) { |
SourcePosition position = deopt_info.position; |
int deopt_id = deopt_info.deopt_id; |
- masm()->RecordDeoptReason(deopt_info.deopt_reason, position, deopt_id); |
+ if (masm()->isolate()->NeedsSourcePositionsForProfiling()) { |
+ masm()->RecordDeoptReason(deopt_info.deopt_reason, position, deopt_id); |
+ } |
} |