[Merge] lp:~jamesodhunt/upstart/bug-1199778 into lp:upstart
James Hunt
james.hunt at canonical.com
Thu Jul 11 14:22:22 UTC 2013
Assertions are added to the code to ensure expected behaviour. The order of object deserialisation was chosen very carefully to minimise circular dependencies (see init/state.h for details), so we cannot arbitrarily refactor that part of the code without careful planning: even if we _did_ do such a refactor, the assertions would be invaluable to ensure that we hadn't broken something horribly.
The reason we don't have those NIH_LIST_EMPTY assertions in the deserialisation code for the remaining objects (JobClass, Job and ConfFile) is that they are not lists; they are NihHash objects and there is no equivalent to NIH_LIST_EMPTY for hashes. We _could_ simulate one using NIH_HASH_FOREACH* but we'd need to take great care to ensure the hash was not already being iterated. In summary, we probably should look into adding additional asserts for those objects.
--
https://code.launchpad.net/~jamesodhunt/upstart/bug-1199778/+merge/174138
Your team Upstart Reviewers is subscribed to branch lp:upstart.
More information about the upstart-devel
mailing list