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

Unified Diff: tools/gn/template.cc

Issue 2148093002: GN: Use the correct defaults for templates invoked via target(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/functions.cc ('K') | « tools/gn/template.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/template.cc
diff --git a/tools/gn/template.cc b/tools/gn/template.cc
index 8b8ae692bc43791b5ec249dc40d2f215632aa31a..3c4d76dafaef69bfa1d943fb163656ee448fc2c9 100644
--- a/tools/gn/template.cc
+++ b/tools/gn/template.cc
@@ -26,6 +26,7 @@ Template::~Template() {
Value Template::Invoke(Scope* scope,
const FunctionCallNode* invocation,
+ const std::string& template_name,
const std::vector<Value>& args,
BlockNode* block,
Err* err) const {
@@ -37,8 +38,7 @@ Value Template::Invoke(Scope* scope,
// First run the invocation's block. Need to allocate the scope on the heap
// so we can pass ownership to the template.
std::unique_ptr<Scope> invocation_scope(new Scope(scope));
- if (!FillTargetBlockScope(scope, invocation,
- invocation->function().value().as_string(),
+ if (!FillTargetBlockScope(scope, invocation, template_name,
block, args, invocation_scope.get(), err))
return Value();
« tools/gn/functions.cc ('K') | « tools/gn/template.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698