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

Unified Diff: tools/gn/builder.cc

Issue 224633002: Add GN buildfile for gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « third_party/libjpeg/BUILD.gn ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/builder.cc
diff --git a/tools/gn/builder.cc b/tools/gn/builder.cc
index 0f54893268dc4356360b4158b96c3abeb80a53fd..a04d3ad9c141a57721070a6a1ad7b10565ee2f63 100644
--- a/tools/gn/builder.cc
+++ b/tools/gn/builder.cc
@@ -251,6 +251,7 @@ BuilderRecord* Builder::GetOrCreateRecordOfType(const Label& label,
if (!record) {
// Not seen this record yet, create a new one.
record = new BuilderRecord(type, label);
+ record->set_originally_referenced_from(request_from);
records_[label] = record;
return record;
}
@@ -259,12 +260,14 @@ BuilderRecord* Builder::GetOrCreateRecordOfType(const Label& label,
if (record->type() != type) {
*err = Err(request_from, "Item type does not match.",
"The item \"" + label.GetUserVisibleName(false) +
- "\" was expected\nto be a " +
+ "\"\nwas expected to be a " +
BuilderRecord::GetNameForType(type) +
- " but was previously\n referenced as a " +
+ " but was previously referenced as a " +
BuilderRecord::GetNameForType(record->type()));
- err->AppendSubErr(Err(record->originally_referenced_from(),
- "The previous reference was here."));
+ if (record->originally_referenced_from()) {
+ err->AppendSubErr(Err(record->originally_referenced_from(),
+ "The previous reference was here."));
+ }
return NULL;
}
« no previous file with comments | « third_party/libjpeg/BUILD.gn ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698