| Index: headless/public/util/error_reporter.h
|
| diff --git a/headless/public/util/error_reporter.h b/headless/public/util/error_reporter.h
|
| index d7eb5e96d2148a881c6c86ad3a87f341119ff0e6..0f496c21723194b3da8b4775e128a905b0f2f6fa 100644
|
| --- a/headless/public/util/error_reporter.h
|
| +++ b/headless/public/util/error_reporter.h
|
| @@ -13,12 +13,14 @@
|
|
|
| namespace headless {
|
|
|
| -// Tracks errors which are encountered while parsing client API types.
|
| +// Tracks errors which are encountered while parsing client API types. Note that
|
| +// errors are only reported in debug builds (i.e., when DCHECK is enabled).
|
| class HEADLESS_EXPORT ErrorReporter {
|
| public:
|
| ErrorReporter();
|
| ~ErrorReporter();
|
|
|
| +#if DCHECK_IS_ON()
|
| // Enter a new nested parsing context. It will initially have a null name.
|
| void Push();
|
|
|
| @@ -37,6 +39,13 @@ class HEADLESS_EXPORT ErrorReporter {
|
|
|
| // Returns a list of reported errors.
|
| const std::vector<std::string>& errors() const { return errors_; }
|
| +#else // DCHECK_IS_ON()
|
| + inline void Push() {}
|
| + inline void Pop() {}
|
| + inline void SetName(const char* name) {}
|
| + inline void AddError(base::StringPiece description) {}
|
| + inline bool HasErrors() const { return false; }
|
| +#endif // DCHECK_IS_ON()
|
|
|
| private:
|
| std::vector<const char*> path_;
|
|
|