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

Unified Diff: src/parser.cc

Issue 619583005: Debug a mystery crash bug in script streaming. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: code review (jochen) Created 6 years, 3 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/parser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 9d1a40d39b9ebb7b47730b4f287d0abcca684276..ed04d248d0f49e4befe505cddf3bd22b22da5cbe 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -807,6 +807,7 @@ FunctionLiteral* Parser::ParseProgram() {
// Initialize parser state.
CompleteParserRecorder recorder;
+ debug_saved_compile_options_ = compile_options();
if (compile_options() == ScriptCompiler::kProduceParserCache) {
log_ = &recorder;
} else if (compile_options() == ScriptCompiler::kConsumeParserCache) {
@@ -3702,6 +3703,17 @@ void Parser::SkipLazyFunctionBody(const AstRawString* function_name,
int* materialized_literal_count,
int* expected_property_count,
bool* ok) {
+ // Temporary debugging code for tracking down a mystery crash which should
+ // never happen. The crash happens on the line where we log the function in
+ // the preparse data: log_->LogFunction(...). TODO(marja): remove this once
+ // done.
+ CHECK(materialized_literal_count);
+ CHECK(expected_property_count);
+ CHECK(debug_saved_compile_options_ == compile_options());
+ if (compile_options() == ScriptCompiler::kProduceParserCache) {
+ CHECK(log_);
+ }
+
int function_block_pos = position();
if (compile_options() == ScriptCompiler::kConsumeParserCache) {
// If we have cached data, we use it to skip parsing the function body. The
@@ -4926,6 +4938,7 @@ void Parser::ParseOnBackground() {
fni_ = new (zone()) FuncNameInferrer(ast_value_factory(), zone());
CompleteParserRecorder recorder;
+ debug_saved_compile_options_ = compile_options();
if (compile_options() == ScriptCompiler::kProduceParserCache) {
log_ = &recorder;
}
« no previous file with comments | « src/parser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698