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

Unified Diff: src/compiler.cc

Issue 1247743002: Debugger: fix crash when debugger is enabled between parsing and compiling. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: added assertion Created 5 years, 5 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 | « src/background-parsing-task.cc ('k') | src/debug.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index fc6760d3f26386b8a23cb09316dbf78a5b17de30..b71e72b12784d0c4f3f33a3057c796b620a6f830 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1072,6 +1072,8 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
}
}
+ DCHECK(!info->is_debug() || !parse_info->allow_lazy_parsing());
+
info->MarkAsFirstCompile();
FunctionLiteral* lit = info->function();
@@ -1333,8 +1335,10 @@ Handle<SharedFunctionInfo> Compiler::CompileStreamedScript(
static_cast<LanguageMode>(parse_info->language_mode() | language_mode));
CompilationInfo compile_info(parse_info);
- // TODO(marja): FLAG_serialize_toplevel is not honoured and won't be; when the
- // real code caching lands, streaming needs to be adapted to use it.
+
+ // If compiling for debugging, parse eagerly from scratch.
+ if (compile_info.is_debug()) parse_info->set_literal(NULL);
+
return CompileToplevel(&compile_info);
}
« no previous file with comments | « src/background-parsing-task.cc ('k') | src/debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698