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

Unified Diff: src/preparse-data.cc

Issue 939303002: Replace is_reference_error bool argument with ParseErrorType enum (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Marja comments addressed Created 5 years, 10 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/preparse-data.h ('k') | src/preparse-data-format.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparse-data.cc
diff --git a/src/preparse-data.cc b/src/preparse-data.cc
index a66a1adcf9b6bd7eb6d12735d231843657e70287..40498d69da1d679a73f064ca8e799ee9b2883473 100644
--- a/src/preparse-data.cc
+++ b/src/preparse-data.cc
@@ -28,11 +28,10 @@ CompleteParserRecorder::CompleteParserRecorder() {
}
-void CompleteParserRecorder::LogMessage(int start_pos,
- int end_pos,
+void CompleteParserRecorder::LogMessage(int start_pos, int end_pos,
const char* message,
const char* arg_opt,
- bool is_reference_error) {
+ ParseErrorType error_type) {
if (HasError()) return;
preamble_[PreparseDataConstants::kHasErrorOffset] = true;
function_store_.Reset();
@@ -42,8 +41,8 @@ void CompleteParserRecorder::LogMessage(int start_pos,
function_store_.Add(end_pos);
STATIC_ASSERT(PreparseDataConstants::kMessageArgCountPos == 2);
function_store_.Add((arg_opt == NULL) ? 0 : 1);
- STATIC_ASSERT(PreparseDataConstants::kIsReferenceErrorPos == 3);
- function_store_.Add(is_reference_error ? 1 : 0);
+ STATIC_ASSERT(PreparseDataConstants::kParseErrorTypePos == 3);
+ function_store_.Add(error_type);
STATIC_ASSERT(PreparseDataConstants::kMessageTextPos == 4);
WriteString(CStrVector(message));
if (arg_opt != NULL) WriteString(CStrVector(arg_opt));
« no previous file with comments | « src/preparse-data.h ('k') | src/preparse-data-format.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698