зеркало из https://github.com/mozilla/gecko-dev.git
6ff82016a0
This commit trades away consistency in order to reduce code execution. Hopefully this avoids executing code that is likely not "shutdown safe" and is inadvertently restarting services or otherwise hanging when run during shutdown. The trade off is that the written targeting snapshot may now be incomplete (which was always the case in the face of runtime errors, e.g., corrupt a database) or internally inconsistent (which is probably new). For example, weekly usage could be populated but most frecent sites could be empty, contradicting the usage. This trade-off is accepted: occassionally targeting the user "in the past" (generally, with data captured 30 minutes ago) is preferable to relatively frequent shutdown crashes. I would have liked to have checked for `shuttingDown` in [CachedTargetingGetter](https://searchfox.org/mozilla-central/rev/abf6758ed833c203f84703aa2e3e3d317571b1e9/browser/components/newtab/lib/ASRouterTargeting.jsm#152), but doing so might throw exceptions (or inject `null` values) where they were not anticipated, which carries risks that I couldn't easily mitigate. If the measure implemented here is ineffective, we'll likely need to restrict the set of targeting data collected, but I hope to avoid that, since it reduces the flexibility of the background messaging targeting significantly, and we may want the agility provided by rich targeting at an unknown time in the future. Differential Revision: https://phabricator.services.mozilla.com/D165916 |
||
---|---|---|
.. | ||
defaultagent | ||
downloads | ||
extensions | ||
handling | ||
installer | ||
notificationserver | ||
preferences | ||
update |