Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 11d4842d6d4adf7d806b9dcb1660b1e80b9199e3..9ed494378a1177bcd4cf369a6ddd27276665c27c 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -112,6 +112,7 @@ |
// with deoptimization support. |
if (isolate_->serializer_enabled()) EnableDeoptimizationSupport(); |
+ if (isolate_->debug()->is_active()) MarkAsDebug(); |
if (FLAG_context_specialization) MarkAsContextSpecializing(); |
if (FLAG_turbo_inlining) MarkAsInliningEnabled(); |
if (FLAG_turbo_source_positions) MarkAsSourcePositionsEnabled(); |
@@ -1165,7 +1166,8 @@ |
parse_info.set_parse_restriction(restriction); |
parse_info.set_context(context); |
- info.MarkAsDebug(); |
+ // If we eval from debug code, compile for debugging as well. |
+ if (outer_info->HasDebugCode()) info.MarkAsDebug(); |
Debug::RecordEvalCaller(script); |
shared_info = CompileToplevel(&info); |