Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index 1d7e967cc733efc3939b3652d3a5b58dbcabd8a5..e480b194c93f443a3d78adf7cef32021c6256e3e 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -1112,12 +1112,10 @@ Handle<Code> Pipeline::GenerateCode() { |
int pos = info()->shared_info()->start_position(); |
json_of << "{\"function\":\"" << function_name.get() |
<< "\", \"sourcePosition\":" << pos << ", \"source\":\""; |
- if (info()->has_literal() && !script->IsUndefined() && |
- !script->source()->IsUndefined()) { |
+ if (!script->IsUndefined() && !script->source()->IsUndefined()) { |
DisallowHeapAllocation no_allocation; |
- FunctionLiteral* function = info()->literal(); |
- int start = function->start_position(); |
- int len = function->end_position() - start; |
+ int start = info()->shared_info()->start_position(); |
+ int len = info()->shared_info()->end_position() - start; |
String::SubStringRange source(String::cast(script->source()), start, |
len); |
for (const auto& c : source) { |