Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 1 | // Copyright 2015 Google Inc. All rights reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 15 | package android |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 16 | |
| 17 | import ( |
Colin Cross | eabaedd | 2020-02-06 17:01:55 -0800 | [diff] [blame] | 18 | "reflect" |
| 19 | |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 20 | "github.com/google/blueprint" |
| 21 | "github.com/google/blueprint/proptools" |
| 22 | ) |
| 23 | |
Colin Cross | c99deeb | 2016-04-11 15:06:20 -0700 | [diff] [blame] | 24 | type defaultsDependencyTag struct { |
| 25 | blueprint.BaseDependencyTag |
| 26 | } |
| 27 | |
| 28 | var DefaultsDepTag defaultsDependencyTag |
| 29 | |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 30 | type defaultsProperties struct { |
| 31 | Defaults []string |
| 32 | } |
| 33 | |
Colin Cross | 1f44a3a | 2017-07-07 14:33:33 -0700 | [diff] [blame] | 34 | type DefaultableModuleBase struct { |
Colin Cross | eabaedd | 2020-02-06 17:01:55 -0800 | [diff] [blame] | 35 | defaultsProperties defaultsProperties |
| 36 | defaultableProperties []interface{} |
| 37 | defaultableVariableProperties interface{} |
Paul Duffin | afa9fa1 | 2020-04-29 16:47:28 +0100 | [diff] [blame^] | 38 | |
| 39 | // The optional hook to call after any defaults have been applied. |
| 40 | hook DefaultableHook |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 41 | } |
| 42 | |
Colin Cross | 1f44a3a | 2017-07-07 14:33:33 -0700 | [diff] [blame] | 43 | func (d *DefaultableModuleBase) defaults() *defaultsProperties { |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 44 | return &d.defaultsProperties |
| 45 | } |
| 46 | |
Colin Cross | eabaedd | 2020-02-06 17:01:55 -0800 | [diff] [blame] | 47 | func (d *DefaultableModuleBase) setProperties(props []interface{}, variableProperties interface{}) { |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 48 | d.defaultableProperties = props |
Colin Cross | eabaedd | 2020-02-06 17:01:55 -0800 | [diff] [blame] | 49 | d.defaultableVariableProperties = variableProperties |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 50 | } |
| 51 | |
Paul Duffin | afa9fa1 | 2020-04-29 16:47:28 +0100 | [diff] [blame^] | 52 | func (d *DefaultableModuleBase) SetDefaultableHook(hook DefaultableHook) { |
| 53 | d.hook = hook |
| 54 | } |
| 55 | |
| 56 | func (d *DefaultableModuleBase) callHookIfAvailable(ctx DefaultableHookContext) { |
| 57 | if d.hook != nil { |
| 58 | d.hook(ctx) |
| 59 | } |
| 60 | } |
| 61 | |
Paul Duffin | 7df7fb0 | 2019-07-24 12:26:14 +0100 | [diff] [blame] | 62 | // Interface that must be supported by any module to which defaults can be applied. |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 63 | type Defaultable interface { |
Paul Duffin | 7df7fb0 | 2019-07-24 12:26:14 +0100 | [diff] [blame] | 64 | // Get a pointer to the struct containing the Defaults property. |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 65 | defaults() *defaultsProperties |
Paul Duffin | 7df7fb0 | 2019-07-24 12:26:14 +0100 | [diff] [blame] | 66 | |
| 67 | // Set the property structures into which defaults will be added. |
Colin Cross | eabaedd | 2020-02-06 17:01:55 -0800 | [diff] [blame] | 68 | setProperties(props []interface{}, variableProperties interface{}) |
Paul Duffin | 7df7fb0 | 2019-07-24 12:26:14 +0100 | [diff] [blame] | 69 | |
| 70 | // Apply defaults from the supplied Defaults to the property structures supplied to |
| 71 | // setProperties(...). |
Colin Cross | 1317701 | 2016-08-09 12:00:45 -0700 | [diff] [blame] | 72 | applyDefaults(TopDownMutatorContext, []Defaults) |
Paul Duffin | afa9fa1 | 2020-04-29 16:47:28 +0100 | [diff] [blame^] | 73 | |
| 74 | // Set the hook to be called after any defaults have been applied. |
| 75 | // |
| 76 | // Should be used in preference to a AddLoadHook when the behavior of the load |
| 77 | // hook is dependent on properties supplied in the Android.bp file. |
| 78 | SetDefaultableHook(hook DefaultableHook) |
| 79 | |
| 80 | // Call the hook if specified. |
| 81 | callHookIfAvailable(context DefaultableHookContext) |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 82 | } |
| 83 | |
Colin Cross | 1f44a3a | 2017-07-07 14:33:33 -0700 | [diff] [blame] | 84 | type DefaultableModule interface { |
| 85 | Module |
| 86 | Defaultable |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 87 | } |
| 88 | |
Colin Cross | 1f44a3a | 2017-07-07 14:33:33 -0700 | [diff] [blame] | 89 | var _ Defaultable = (*DefaultableModuleBase)(nil) |
| 90 | |
| 91 | func InitDefaultableModule(module DefaultableModule) { |
Colin Cross | eabaedd | 2020-02-06 17:01:55 -0800 | [diff] [blame] | 92 | if module.(Module).base().module == nil { |
| 93 | panic("InitAndroidModule must be called before InitDefaultableModule") |
| 94 | } |
| 95 | module.setProperties(module.(Module).GetProperties(), module.(Module).base().variableProperties) |
Colin Cross | 1f44a3a | 2017-07-07 14:33:33 -0700 | [diff] [blame] | 96 | |
| 97 | module.AddProperties(module.defaults()) |
| 98 | } |
| 99 | |
Paul Duffin | afa9fa1 | 2020-04-29 16:47:28 +0100 | [diff] [blame^] | 100 | // A restricted subset of context methods, similar to LoadHookContext. |
| 101 | type DefaultableHookContext interface { |
| 102 | EarlyModuleContext |
| 103 | |
| 104 | CreateModule(ModuleFactory, ...interface{}) Module |
| 105 | } |
| 106 | |
| 107 | type DefaultableHook func(ctx DefaultableHookContext) |
| 108 | |
Paul Duffin | 95d53b5 | 2019-07-24 13:45:05 +0100 | [diff] [blame] | 109 | // The Defaults_visibility property. |
| 110 | type DefaultsVisibilityProperties struct { |
| 111 | |
| 112 | // Controls the visibility of the defaults module itself. |
| 113 | Defaults_visibility []string |
| 114 | } |
| 115 | |
Colin Cross | 1f44a3a | 2017-07-07 14:33:33 -0700 | [diff] [blame] | 116 | type DefaultsModuleBase struct { |
| 117 | DefaultableModuleBase |
Paul Duffin | 63c6e18 | 2019-07-24 14:24:38 +0100 | [diff] [blame] | 118 | |
| 119 | // Container for defaults of the common properties |
| 120 | commonProperties commonProperties |
Paul Duffin | 95d53b5 | 2019-07-24 13:45:05 +0100 | [diff] [blame] | 121 | |
| 122 | defaultsVisibilityProperties DefaultsVisibilityProperties |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 123 | } |
| 124 | |
Martin Stjernholm | ebd757d | 2019-05-24 11:00:30 +0100 | [diff] [blame] | 125 | // The common pattern for defaults modules is to register separate instances of |
| 126 | // the xxxProperties structs in the AddProperties calls, rather than reusing the |
| 127 | // ones inherited from Module. |
| 128 | // |
| 129 | // The effect is that e.g. myDefaultsModuleInstance.base().xxxProperties won't |
| 130 | // contain the values that have been set for the defaults module. Rather, to |
| 131 | // retrieve the values it is necessary to iterate over properties(). E.g. to get |
| 132 | // the commonProperties instance that have the real values: |
| 133 | // |
| 134 | // d := myModule.(Defaults) |
| 135 | // for _, props := range d.properties() { |
| 136 | // if cp, ok := props.(*commonProperties); ok { |
| 137 | // ... access property values in cp ... |
| 138 | // } |
| 139 | // } |
| 140 | // |
| 141 | // The rationale is that the properties on a defaults module apply to the |
| 142 | // defaultable modules using it, not to the defaults module itself. E.g. setting |
| 143 | // the "enabled" property false makes inheriting modules disabled by default, |
| 144 | // rather than disabling the defaults module itself. |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 145 | type Defaults interface { |
Colin Cross | e7b0713 | 2016-07-27 10:15:06 -0700 | [diff] [blame] | 146 | Defaultable |
Paul Duffin | 7df7fb0 | 2019-07-24 12:26:14 +0100 | [diff] [blame] | 147 | |
| 148 | // Although this function is unused it is actually needed to ensure that only modules that embed |
| 149 | // DefaultsModuleBase will type-assert to the Defaults interface. |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 150 | isDefaults() bool |
Paul Duffin | 7df7fb0 | 2019-07-24 12:26:14 +0100 | [diff] [blame] | 151 | |
| 152 | // Get the structures containing the properties for which defaults can be provided. |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 153 | properties() []interface{} |
Paul Duffin | 63c6e18 | 2019-07-24 14:24:38 +0100 | [diff] [blame] | 154 | |
Colin Cross | eabaedd | 2020-02-06 17:01:55 -0800 | [diff] [blame] | 155 | productVariableProperties() interface{} |
| 156 | |
Paul Duffin | 63c6e18 | 2019-07-24 14:24:38 +0100 | [diff] [blame] | 157 | // Return the defaults common properties. |
| 158 | common() *commonProperties |
Paul Duffin | 95d53b5 | 2019-07-24 13:45:05 +0100 | [diff] [blame] | 159 | |
| 160 | // Return the defaults visibility properties. |
| 161 | defaultsVisibility() *DefaultsVisibilityProperties |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 162 | } |
| 163 | |
Colin Cross | 1f44a3a | 2017-07-07 14:33:33 -0700 | [diff] [blame] | 164 | func (d *DefaultsModuleBase) isDefaults() bool { |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 165 | return true |
| 166 | } |
| 167 | |
Paul Duffin | e62432f | 2019-07-24 12:51:21 +0100 | [diff] [blame] | 168 | type DefaultsModule interface { |
| 169 | Module |
| 170 | Defaults |
| 171 | } |
| 172 | |
Colin Cross | 1f44a3a | 2017-07-07 14:33:33 -0700 | [diff] [blame] | 173 | func (d *DefaultsModuleBase) properties() []interface{} { |
Colin Cross | e7b0713 | 2016-07-27 10:15:06 -0700 | [diff] [blame] | 174 | return d.defaultableProperties |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 175 | } |
| 176 | |
Colin Cross | eabaedd | 2020-02-06 17:01:55 -0800 | [diff] [blame] | 177 | func (d *DefaultsModuleBase) productVariableProperties() interface{} { |
| 178 | return d.defaultableVariableProperties |
| 179 | } |
| 180 | |
Paul Duffin | 63c6e18 | 2019-07-24 14:24:38 +0100 | [diff] [blame] | 181 | func (d *DefaultsModuleBase) common() *commonProperties { |
| 182 | return &d.commonProperties |
| 183 | } |
| 184 | |
Paul Duffin | 95d53b5 | 2019-07-24 13:45:05 +0100 | [diff] [blame] | 185 | func (d *DefaultsModuleBase) defaultsVisibility() *DefaultsVisibilityProperties { |
| 186 | return &d.defaultsVisibilityProperties |
| 187 | } |
| 188 | |
Colin Cross | 5903762 | 2019-06-10 13:12:56 -0700 | [diff] [blame] | 189 | func (d *DefaultsModuleBase) GenerateAndroidBuildActions(ctx ModuleContext) { |
| 190 | } |
| 191 | |
Paul Duffin | e62432f | 2019-07-24 12:51:21 +0100 | [diff] [blame] | 192 | func InitDefaultsModule(module DefaultsModule) { |
Paul Duffin | 63c6e18 | 2019-07-24 14:24:38 +0100 | [diff] [blame] | 193 | commonProperties := module.common() |
| 194 | |
Colin Cross | 3624285 | 2017-06-23 15:06:31 -0700 | [diff] [blame] | 195 | module.AddProperties( |
Colin Cross | fc75458 | 2016-05-17 16:34:16 -0700 | [diff] [blame] | 196 | &hostAndDeviceProperties{}, |
Paul Duffin | 63c6e18 | 2019-07-24 14:24:38 +0100 | [diff] [blame] | 197 | commonProperties, |
Jiyong Park | 3814f4d | 2019-12-02 13:08:53 +0900 | [diff] [blame] | 198 | &ApexProperties{}) |
Colin Cross | fc75458 | 2016-05-17 16:34:16 -0700 | [diff] [blame] | 199 | |
Colin Cross | eabaedd | 2020-02-06 17:01:55 -0800 | [diff] [blame] | 200 | initAndroidModuleBase(module) |
| 201 | initProductVariableModule(module) |
Colin Cross | 3624285 | 2017-06-23 15:06:31 -0700 | [diff] [blame] | 202 | InitArchModule(module) |
Colin Cross | 1f44a3a | 2017-07-07 14:33:33 -0700 | [diff] [blame] | 203 | InitDefaultableModule(module) |
Colin Cross | fc75458 | 2016-05-17 16:34:16 -0700 | [diff] [blame] | 204 | |
Paul Duffin | 7df7fb0 | 2019-07-24 12:26:14 +0100 | [diff] [blame] | 205 | // Add properties that will not have defaults applied to them. |
Paul Duffin | 63c6e18 | 2019-07-24 14:24:38 +0100 | [diff] [blame] | 206 | base := module.base() |
Paul Duffin | 95d53b5 | 2019-07-24 13:45:05 +0100 | [diff] [blame] | 207 | defaultsVisibility := module.defaultsVisibility() |
| 208 | module.AddProperties(&base.nameProperties, defaultsVisibility) |
Colin Cross | fc75458 | 2016-05-17 16:34:16 -0700 | [diff] [blame] | 209 | |
Paul Duffin | 63c6e18 | 2019-07-24 14:24:38 +0100 | [diff] [blame] | 210 | // Unlike non-defaults modules the visibility property is not stored in m.base().commonProperties. |
Paul Duffin | 5ec73ec | 2020-05-01 17:52:01 +0100 | [diff] [blame] | 211 | // Instead it is stored in a separate instance of commonProperties created above so clear the |
| 212 | // existing list of properties. |
| 213 | clearVisibilityProperties(module) |
| 214 | |
| 215 | // The defaults_visibility property controls the visibility of a defaults module so it must be |
| 216 | // set as the primary property, which also adds it to the list. |
| 217 | setPrimaryVisibilityProperty(module, "defaults_visibility", &defaultsVisibility.Defaults_visibility) |
| 218 | |
Paul Duffin | 63c6e18 | 2019-07-24 14:24:38 +0100 | [diff] [blame] | 219 | // The visibility property needs to be checked (but not parsed) by the visibility module during |
Paul Duffin | 5ec73ec | 2020-05-01 17:52:01 +0100 | [diff] [blame] | 220 | // its checking phase and parsing phase so add it to the list as a normal property. |
| 221 | AddVisibilityProperty(module, "visibility", &commonProperties.Visibility) |
Paul Duffin | 63c6e18 | 2019-07-24 14:24:38 +0100 | [diff] [blame] | 222 | |
| 223 | base.module = module |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 224 | } |
| 225 | |
Colin Cross | 1f44a3a | 2017-07-07 14:33:33 -0700 | [diff] [blame] | 226 | var _ Defaults = (*DefaultsModuleBase)(nil) |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 227 | |
Colin Cross | 1f44a3a | 2017-07-07 14:33:33 -0700 | [diff] [blame] | 228 | func (defaultable *DefaultableModuleBase) applyDefaults(ctx TopDownMutatorContext, |
Colin Cross | 1317701 | 2016-08-09 12:00:45 -0700 | [diff] [blame] | 229 | defaultsList []Defaults) { |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 230 | |
Colin Cross | 1317701 | 2016-08-09 12:00:45 -0700 | [diff] [blame] | 231 | for _, defaults := range defaultsList { |
| 232 | for _, prop := range defaultable.defaultableProperties { |
Colin Cross | eabaedd | 2020-02-06 17:01:55 -0800 | [diff] [blame] | 233 | if prop == defaultable.defaultableVariableProperties { |
| 234 | defaultable.applyDefaultVariableProperties(ctx, defaults, prop) |
| 235 | } else { |
| 236 | defaultable.applyDefaultProperties(ctx, defaults, prop) |
| 237 | } |
| 238 | } |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | // Product variable properties need special handling, the type of the filtered product variable |
| 243 | // property struct may not be identical between the defaults module and the defaultable module. |
| 244 | // Use PrependMatchingProperties to apply whichever properties match. |
| 245 | func (defaultable *DefaultableModuleBase) applyDefaultVariableProperties(ctx TopDownMutatorContext, |
| 246 | defaults Defaults, defaultableProp interface{}) { |
| 247 | if defaultableProp == nil { |
| 248 | return |
| 249 | } |
| 250 | |
| 251 | defaultsProp := defaults.productVariableProperties() |
| 252 | if defaultsProp == nil { |
| 253 | return |
| 254 | } |
| 255 | |
| 256 | dst := []interface{}{ |
| 257 | defaultableProp, |
| 258 | // Put an empty copy of the src properties into dst so that properties in src that are not in dst |
| 259 | // don't cause a "failed to find property to extend" error. |
| 260 | proptools.CloneEmptyProperties(reflect.ValueOf(defaultsProp)).Interface(), |
| 261 | } |
| 262 | |
| 263 | err := proptools.PrependMatchingProperties(dst, defaultsProp, nil) |
| 264 | if err != nil { |
| 265 | if propertyErr, ok := err.(*proptools.ExtendPropertyError); ok { |
| 266 | ctx.PropertyErrorf(propertyErr.Property, "%s", propertyErr.Err.Error()) |
| 267 | } else { |
| 268 | panic(err) |
| 269 | } |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | func (defaultable *DefaultableModuleBase) applyDefaultProperties(ctx TopDownMutatorContext, |
| 274 | defaults Defaults, defaultableProp interface{}) { |
| 275 | |
| 276 | for _, def := range defaults.properties() { |
| 277 | if proptools.TypeEqual(defaultableProp, def) { |
| 278 | err := proptools.PrependProperties(defaultableProp, def, nil) |
| 279 | if err != nil { |
| 280 | if propertyErr, ok := err.(*proptools.ExtendPropertyError); ok { |
| 281 | ctx.PropertyErrorf(propertyErr.Property, "%s", propertyErr.Err.Error()) |
| 282 | } else { |
| 283 | panic(err) |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 284 | } |
| 285 | } |
| 286 | } |
| 287 | } |
| 288 | } |
| 289 | |
Colin Cross | 89536d4 | 2017-07-07 14:35:50 -0700 | [diff] [blame] | 290 | func RegisterDefaultsPreArchMutators(ctx RegisterMutatorsContext) { |
Colin Cross | cec8171 | 2017-07-13 14:43:27 -0700 | [diff] [blame] | 291 | ctx.BottomUp("defaults_deps", defaultsDepsMutator).Parallel() |
| 292 | ctx.TopDown("defaults", defaultsMutator).Parallel() |
| 293 | } |
| 294 | |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 295 | func defaultsDepsMutator(ctx BottomUpMutatorContext) { |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 296 | if defaultable, ok := ctx.Module().(Defaultable); ok { |
Colin Cross | c99deeb | 2016-04-11 15:06:20 -0700 | [diff] [blame] | 297 | ctx.AddDependency(ctx.Module(), DefaultsDepTag, defaultable.defaults().Defaults...) |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 298 | } |
| 299 | } |
| 300 | |
Colin Cross | 1317701 | 2016-08-09 12:00:45 -0700 | [diff] [blame] | 301 | func defaultsMutator(ctx TopDownMutatorContext) { |
Paul Duffin | afa9fa1 | 2020-04-29 16:47:28 +0100 | [diff] [blame^] | 302 | if defaultable, ok := ctx.Module().(Defaultable); ok { |
| 303 | if len(defaultable.defaults().Defaults) > 0 { |
| 304 | var defaultsList []Defaults |
| 305 | seen := make(map[Defaults]bool) |
Colin Cross | a1ce2a0 | 2018-06-20 15:19:39 -0700 | [diff] [blame] | 306 | |
Paul Duffin | afa9fa1 | 2020-04-29 16:47:28 +0100 | [diff] [blame^] | 307 | ctx.WalkDeps(func(module, parent Module) bool { |
| 308 | if ctx.OtherModuleDependencyTag(module) == DefaultsDepTag { |
| 309 | if defaults, ok := module.(Defaults); ok { |
| 310 | if !seen[defaults] { |
| 311 | seen[defaults] = true |
| 312 | defaultsList = append(defaultsList, defaults) |
| 313 | return len(defaults.defaults().Defaults) > 0 |
| 314 | } |
| 315 | } else { |
| 316 | ctx.PropertyErrorf("defaults", "module %s is not an defaults module", |
| 317 | ctx.OtherModuleName(module)) |
Colin Cross | a1ce2a0 | 2018-06-20 15:19:39 -0700 | [diff] [blame] | 318 | } |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 319 | } |
Paul Duffin | afa9fa1 | 2020-04-29 16:47:28 +0100 | [diff] [blame^] | 320 | return false |
| 321 | }) |
| 322 | defaultable.applyDefaults(ctx, defaultsList) |
| 323 | } |
| 324 | |
| 325 | defaultable.callHookIfAvailable(ctx) |
Colin Cross | cfad119 | 2015-11-02 16:43:11 -0800 | [diff] [blame] | 326 | } |
| 327 | } |