Merge "Reset contexts before calling LoadHook"
This commit is contained in:
commit
33132a4fd5
1 changed files with 8 additions and 8 deletions
|
@ -1368,6 +1368,8 @@ func runAndRemoveLoadHooks(ctx *Context, config interface{}, module *moduleInfo,
|
|||
|
||||
if v, exists := pendingHooks.Load(module.logicModule); exists {
|
||||
hooks := v.(*[]LoadHook)
|
||||
|
||||
for _, hook := range *hooks {
|
||||
mctx := &loadHookContext{
|
||||
baseModuleContext: baseModuleContext{
|
||||
context: ctx,
|
||||
|
@ -1376,8 +1378,6 @@ func runAndRemoveLoadHooks(ctx *Context, config interface{}, module *moduleInfo,
|
|||
},
|
||||
scopedModuleFactories: scopedModuleFactories,
|
||||
}
|
||||
|
||||
for _, hook := range *hooks {
|
||||
hook(mctx)
|
||||
newModules = append(newModules, mctx.newModules...)
|
||||
deps = append(deps, mctx.ninjaFileDeps...)
|
||||
|
|
Loading…
Reference in a new issue