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

Unified Diff: tools/gn/value_extractors.cc

Issue 1155713006: GN: Make file/dir resolving return errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« tools/gn/source_dir.cc ('K') | « tools/gn/source_file.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/value_extractors.cc
diff --git a/tools/gn/value_extractors.cc b/tools/gn/value_extractors.cc
index 6dfaa2f677e35ff5c315896826e292dc2fdae885..365c5342779c841b79e34337ff6cc4a93c7a1add 100644
--- a/tools/gn/value_extractors.cc
+++ b/tools/gn/value_extractors.cc
@@ -65,11 +65,9 @@ struct RelativeFileConverter {
current_dir(current_dir_in) {
}
bool operator()(const Value& v, SourceFile* out, Err* err) const {
- if (!v.VerifyTypeIs(Value::STRING, err))
- return false;
- *out = current_dir.ResolveRelativeFile(v.string_value(),
+ *out = current_dir.ResolveRelativeFile(v, err,
build_settings->root_path_utf8());
- return true;
+ return !err->has_error();
}
const BuildSettings* build_settings;
const SourceDir& current_dir;
@@ -82,9 +80,7 @@ struct RelativeDirConverter {
current_dir(current_dir_in) {
}
bool operator()(const Value& v, SourceDir* out, Err* err) const {
- if (!v.VerifyTypeIs(Value::STRING, err))
- return false;
- *out = current_dir.ResolveRelativeDir(v.string_value(),
+ *out = current_dir.ResolveRelativeDir(v, err,
build_settings->root_path_utf8());
return true;
}
« tools/gn/source_dir.cc ('K') | « tools/gn/source_file.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698