Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: src/compiler/code-generator.cc

Issue 2071753002: Fix FLAG_code_comments crash for WASM functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-generator.cc
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
index ce5ce1e2e9d581e3c7855ee4f38ef99cac41fe4e..701130c7829769baf10d9abc63f45f5f00d647e1 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -401,8 +401,9 @@ void CodeGenerator::AssembleSourcePosition(Instruction* instr) {
masm()->positions_recorder()->RecordPosition(code_pos);
masm()->positions_recorder()->WriteRecordedPositions();
if (FLAG_code_comments) {
- Vector<char> buffer = Vector<char>::New(256);
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 cn = Script::GetColumnNumber(info->script(), code_pos);
if (info->script()->name()->IsString()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698