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

Unified Diff: src/parser.cc

Issue 266423003: Produce cached data only for scripts which compile without errors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 0ff11f2281612260d87e51467b7caca13f6d935b..f07f37ebb2b271cc6466ff2dde8af462adb0a9a7 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -854,8 +854,10 @@ FunctionLiteral* Parser::ParseProgram() {
PrintF(" - took %0.3f ms]\n", ms);
}
if (cached_data_mode_ == PRODUCE_CACHED_DATA) {
- Vector<unsigned> store = recorder.ExtractData();
- *cached_data_ = new ScriptData(store);
+ if (result != NULL) {
+ Vector<unsigned> store = recorder.ExtractData();
+ *cached_data_ = new ScriptData(store);
+ }
log_ = NULL;
}
return result;
« 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