[compiler] Workaround in code printing without literal.

R=ishell@chromium.org
BUG=chromium:604375
LOG=n

Review URL: https://codereview.chromium.org/1895073002

Cr-Commit-Position: refs/heads/master@{#35588}
This commit is contained in:
mstarzinger 2016-04-18 09:04:56 -07:00 committed by Commit bot
parent 306add32e5
commit 8c6f18aa04

View File

@ -161,6 +161,9 @@ void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) {
bool print_source =
info->parse_info() && (code->kind() == Code::OPTIMIZED_FUNCTION ||
code->kind() == Code::FUNCTION);
// TODO(mstarzinger): Switch this over to use SharedFunctionInfo instead of
// the FunctionLiteral, once we have a SharedFunctionInfo for live edit.
print_source = print_source && info->literal() != nullptr;
if (print_source) {
FunctionLiteral* literal = info->literal();
Handle<Script> script = info->script();