Revision: 24373
Author:   [email protected]
Date:     Wed Oct  1 16:54:42 2014 UTC
Log:      Debug a mystery crash bug in script streaming.

This adds a bunch of checks so we hopefully get more detailed information about
what exactly goes wrong.

[email protected]
BUG=

Review URL: https://codereview.chromium.org/619583005
https://code.google.com/p/v8/source/detail?r=24373

Modified:
 /branches/bleeding_edge/src/parser.cc
 /branches/bleeding_edge/src/parser.h

=======================================
--- /branches/bleeding_edge/src/parser.cc       Thu Sep 25 07:16:15 2014 UTC
+++ /branches/bleeding_edge/src/parser.cc       Wed Oct  1 16:54:42 2014 UTC
@@ -807,6 +807,7 @@
   // 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 @@
                                   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 @@
   fni_ = new (zone()) FuncNameInferrer(ast_value_factory(), zone());

   CompleteParserRecorder recorder;
+  debug_saved_compile_options_ = compile_options();
   if (compile_options() == ScriptCompiler::kProduceParserCache) {
     log_ = &recorder;
   }
=======================================
--- /branches/bleeding_edge/src/parser.h        Thu Sep 18 17:39:49 2014 UTC
+++ /branches/bleeding_edge/src/parser.h        Wed Oct  1 16:54:42 2014 UTC
@@ -850,6 +850,10 @@
   int use_counts_[v8::Isolate::kUseCounterFeatureCount];
   int total_preparse_skipped_;
   HistogramTimer* pre_parse_timer_;
+
+ // Temporary; for debugging. See Parser::SkipLazyFunctionBody. TODO(marja):
+  // remove this once done.
+  ScriptCompiler::CompileOptions debug_saved_compile_options_;
 };


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to