Index: tools/gn/functions.cc |
diff --git a/tools/gn/functions.cc b/tools/gn/functions.cc |
index e973f2ee5c3d0d89e9f985131301640e50028705..35e42d44e98a739179ab0a4e474f4c2c64dd97f3 100644 |
--- a/tools/gn/functions.cc |
+++ b/tools/gn/functions.cc |
@@ -739,8 +739,13 @@ Value RunFunction(Scope* scope, |
block->ExecuteBlockInScope(&block_scope, err); |
if (err->has_error()) |
return Value(); |
- return found_function->second.executed_block_runner( |
+ |
+ Value result = found_function->second.executed_block_runner( |
function, args.list_value(), &block_scope, err); |
+ |
+ if (!block_scope.CheckForUnusedVars(err)) |
+ return Value(); |
+ return result; |
} |
// Otherwise it's a no-block function. |