Commit 5c985733 authored by jing.bao's avatar jing.bao Committed by Commit bot

Fix FLAG_code_comments crash for WASM functions

BUG=

Review-Url: https://codereview.chromium.org/2071753002
Cr-Commit-Position: refs/heads/master@{#37078}
parent a17f3d24
...@@ -401,8 +401,9 @@ void CodeGenerator::AssembleSourcePosition(Instruction* instr) { ...@@ -401,8 +401,9 @@ void CodeGenerator::AssembleSourcePosition(Instruction* instr) {
masm()->positions_recorder()->RecordPosition(code_pos); masm()->positions_recorder()->RecordPosition(code_pos);
masm()->positions_recorder()->WriteRecordedPositions(); masm()->positions_recorder()->WriteRecordedPositions();
if (FLAG_code_comments) { if (FLAG_code_comments) {
Vector<char> buffer = Vector<char>::New(256);
CompilationInfo* info = this->info(); CompilationInfo* info = this->info();
if (!info->parse_info()) return;
Vector<char> buffer = Vector<char>::New(256);
int ln = Script::GetLineNumber(info->script(), code_pos); int ln = Script::GetLineNumber(info->script(), code_pos);
int cn = Script::GetColumnNumber(info->script(), code_pos); int cn = Script::GetColumnNumber(info->script(), code_pos);
if (info->script()->name()->IsString()) { if (info->script()->name()->IsString()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment