Created
February 4, 2012 22:09
-
-
Save bnoordhuis/893d44a6cbb55f531961 to your computer and use it in GitHub Desktop.
preparser/preparser-process.cc patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/preparser/preparser-process.cc b/preparser/preparser-process.cc | |
index b0aeb81..368f63f 100644 | |
--- a/preparser/preparser-process.cc | |
+++ b/preparser/preparser-process.cc | |
@@ -200,12 +200,14 @@ void fail(v8::PreParserData* data, const char* message, ...) { | |
vfprintf(stderr, message, args); | |
va_end(args); | |
fflush(stderr); | |
- // Print preparser data to stdout. | |
- uint32_t size = data->size(); | |
- fprintf(stderr, "LOG: data size: %u\n", size); | |
- if (!WriteBuffer(stdout, data->data(), size)) { | |
- perror("ERROR: Writing data"); | |
- fflush(stderr); | |
+ if (data != NULL) { | |
+ // Print preparser data to stdout. | |
+ uint32_t size = data->size(); | |
+ fprintf(stderr, "LOG: data size: %u\n", size); | |
+ if (!WriteBuffer(stdout, data->data(), size)) { | |
+ perror("ERROR: Writing data"); | |
+ fflush(stderr); | |
+ } | |
} | |
exit(EXIT_FAILURE); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment