Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 09a473c3f1265f8d0020984d87a65726fe2b6938..1a3a007a8536c7b3188affcca5c6fb115c60998a 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -2249,7 +2249,11 @@ Handle<DebugInfo> Factory::NewDebugInfo(Handle<SharedFunctionInfo> shared) { |
Handle<DebugInfo> debug_info = |
Handle<DebugInfo>::cast(NewStruct(DEBUG_INFO_TYPE)); |
debug_info->set_shared(*shared); |
- debug_info->set_code(shared->code()); |
+ if (shared->HasBytecodeArray()) { |
+ debug_info->set_abstract_code(AbstractCode::cast(shared->bytecode_array())); |
+ } else { |
+ debug_info->set_abstract_code(AbstractCode::cast(shared->code())); |
+ } |
debug_info->set_break_points(*break_points); |
// Link debug info to function. |