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

Unified Diff: tools/gn/function_toolchain.cc

Issue 1314773005: Throw errors for nested targets in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « tools/gn/function_template.cc ('k') | tools/gn/functions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/function_toolchain.cc
diff --git a/tools/gn/function_toolchain.cc b/tools/gn/function_toolchain.cc
index 2fe5f53a23c5135918262ed2b0a7cea3f9fa7378..4e1fe2d418e684c07616a352b3689b66e2642c7b 100644
--- a/tools/gn/function_toolchain.cc
+++ b/tools/gn/function_toolchain.cc
@@ -301,6 +301,10 @@ Value RunToolchain(Scope* scope,
const std::vector<Value>& args,
BlockNode* block,
Err* err) {
+ NonNestableBlock non_nestable(scope, function, "toolchain");
+ if (!non_nestable.Enter(err))
+ return Value();
+
if (!EnsureNotProcessingImport(function, scope, err) ||
!EnsureNotProcessingBuildConfig(function, scope, err))
return Value();
« no previous file with comments | « tools/gn/function_template.cc ('k') | tools/gn/functions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698