commit | 7fe43b81ff5d1674856269ddb43e72de3913c575 | [log] [tgz] |
---|---|---|
author | Ben Chan <benchan@chromium.org> | Thu Mar 06 15:36:33 2014 -0800 |
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | Sat Mar 08 03:52:29 2014 +0000 |
tree | 361c03eaa9e62ce79a1ba38cf12fe1bf1c76d17d | |
parent | 7823c6e5d1b48358d62c2a534e84dbbb3388a7eb [diff] |
shill: Crash immediately when failed to create necessary DBus adaptors. A few classes in shill creates a DBus adaptor at construction and freely accesses the adaptor object under the assumption that the adaptor can always be created successfully. In reality, we have observed crashes due to accessing a NULL adaptor. However, as the crashes happened at various call sites when a NULL adaptor was accessed, the crash rate of each intance is low, which makes it easy to miss the bigger problem where shill created objects with duplicated identifiers. This CL makes sure that the code crashes immediately when it fails to create a necessary DBus adaptor so that we can obtain the same crash signatures for scenarios where shill fails to create a DBus adaptor. BUG=chromium:350188 TEST=Build and run unit tests. Change-Id: I9436152d51de2968c6ea92fa749dd200d0633852 Reviewed-on: https://chromium-review.googlesource.com/189116 Reviewed-by: Paul Stewart <pstew@chromium.org> Commit-Queue: Ben Chan <benchan@chromium.org> Tested-by: Ben Chan <benchan@chromium.org>