Index: tools/gn/template.cc |
diff --git a/tools/gn/template.cc b/tools/gn/template.cc |
index e865264174a1740c7fe8a9821dd8d18f5764b84c..66d6745c96c6fe24df033032f77b0c575378fc92 100644 |
--- a/tools/gn/template.cc |
+++ b/tools/gn/template.cc |
@@ -80,8 +80,8 @@ Value Template::Invoke(Scope* scope, |
// be avoided. |
template_scope.SetValue(variables::kInvoker, |
Value(nullptr, std::unique_ptr<Scope>()), invocation); |
- Value* invoker_value = |
- template_scope.GetMutableValue(variables::kInvoker, false); |
+ Value* invoker_value = template_scope.GetMutableValue( |
+ variables::kInvoker, Scope::SEARCH_NESTED, false); |
invoker_value->SetScopeValue(std::move(invocation_scope)); |
template_scope.set_source_dir(scope->GetSourceDir()); |
@@ -108,7 +108,8 @@ Value Template::Invoke(Scope* scope, |
// to overwrite the value of "invoker" and free the Scope owned by the |
// value. So we need to look it up again and don't do anything if it doesn't |
// exist. |
- invoker_value = template_scope.GetMutableValue(variables::kInvoker, false); |
+ invoker_value = template_scope.GetMutableValue( |
+ variables::kInvoker, Scope::SEARCH_NESTED, false); |
if (invoker_value && invoker_value->type() == Value::SCOPE) { |
if (!invoker_value->scope_value()->CheckForUnusedVars(err)) |
return Value(); |