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

Side by Side Diff: tools/gn/input_file_manager.h

Issue 645253002: GN: Store parse error messages (so they aren't dropped due to races) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/gn/input_file_manager.cc » ('j') | tools/gn/input_file_manager.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TOOLS_GN_INPUT_FILE_MANAGER_H_ 5 #ifndef TOOLS_GN_INPUT_FILE_MANAGER_H_
6 #define TOOLS_GN_INPUT_FILE_MANAGER_H_ 6 #define TOOLS_GN_INPUT_FILE_MANAGER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 // Event to signal when the load is complete (or fails). This is lazily 111 // Event to signal when the load is complete (or fails). This is lazily
112 // created only when a thread is synchronously waiting for this load (which 112 // created only when a thread is synchronously waiting for this load (which
113 // only happens for imports). 113 // only happens for imports).
114 scoped_ptr<base::WaitableEvent> completion_event; 114 scoped_ptr<base::WaitableEvent> completion_event;
115 115
116 std::vector<Token> tokens; 116 std::vector<Token> tokens;
117 117
118 // Null before the file is loaded or if loading failed. 118 // Null before the file is loaded or if loading failed.
119 scoped_ptr<ParseNode> parsed_root; 119 scoped_ptr<ParseNode> parsed_root;
120 scoped_ptr<Err> parse_error;
brettw 2014/10/14 17:13:09 You should be able to make this a raw "Err" object
cjhopman 2014/10/16 18:26:02 Done.
120 }; 121 };
121 122
122 virtual ~InputFileManager(); 123 virtual ~InputFileManager();
123 124
124 void BackgroundLoadFile(const LocationRange& origin, 125 void BackgroundLoadFile(const LocationRange& origin,
125 const BuildSettings* build_settings, 126 const BuildSettings* build_settings,
126 const SourceFile& name, 127 const SourceFile& name,
127 InputFile* file); 128 InputFile* file);
128 129
129 // Loads the given file. On error, sets the Err and return false. 130 // Loads the given file. On error, sets the Err and return false.
(...skipping 16 matching lines...) Expand all
146 // 147 //
147 // See AddDynamicInput(). 148 // See AddDynamicInput().
148 // 149 //
149 // Owning pointers. 150 // Owning pointers.
150 std::vector<InputFileData*> dynamic_inputs_; 151 std::vector<InputFileData*> dynamic_inputs_;
151 152
152 DISALLOW_COPY_AND_ASSIGN(InputFileManager); 153 DISALLOW_COPY_AND_ASSIGN(InputFileManager);
153 }; 154 };
154 155
155 #endif // TOOLS_GN_INPUT_FILE_MANAGER_H_ 156 #endif // TOOLS_GN_INPUT_FILE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | tools/gn/input_file_manager.cc » ('j') | tools/gn/input_file_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698