Chromium Code Reviews| Index: src/preparse-data.h |
| diff --git a/src/preparse-data.h b/src/preparse-data.h |
| index 36c481cb3626ffd2d01e2184d3e6d93cd46c4a67..5280c47c79657bda51ed119a06a32f14028c7155 100644 |
| --- a/src/preparse-data.h |
| +++ b/src/preparse-data.h |
| @@ -119,6 +119,10 @@ class SingletonLogger : public ParserRecorder { |
| }; |
| +// Forward declaration for CompleteParserRecorder::GetScriptData. |
|
marja
2014/07/10 08:48:11
Nit: This comment is unnecessary.
Yang
2014/07/10 10:27:58
Done.
|
| +class ScriptData; |
| + |
| + |
| class CompleteParserRecorder : public ParserRecorder { |
| public: |
| struct Key { |
| @@ -149,13 +153,17 @@ class CompleteParserRecorder : public ParserRecorder { |
| const char* message, |
| const char* argument_opt, |
| bool is_reference_error_); |
| - Vector<unsigned> ExtractData(); |
| + ScriptData* GetScriptData(); |
| - private: |
| - bool has_error() { |
| + bool HasError() { |
| return static_cast<bool>(preamble_[PreparseDataConstants::kHasErrorOffset]); |
| } |
| + Vector<unsigned> ErrorMessageData() { |
| + ASSERT(HasError()); |
| + return function_store_.ToVector(); |
| + } |
| + private: |
| void WriteString(Vector<const char> str); |
| // Write a non-negative number to the symbol store. |