Disallow adding ContextLifecycleObservers during iteration.

The implementation of ContextLifecycleNotifier disallows the addition
of ActiveDOMObjects while delivering its notifications, by way of
a RELEASE_ASSERT(). This prevents ending up in inconsistent states where
(e.g.) instructing the ActiveDOMObjects to stop would lead to the
creation of new, but running, ActiveDOMObjects.

Extend this restriction to encompass all ContextLifecycleObservers; none
may be added while iterating over the registered ActiveDOMObjects. This
allows us to simplify the underlying implementation somewhat.

R=haraken
BUG=462949

Review URL: https://codereview.chromium.org/1024543004

git-svn-id: svn://svn.chromium.org/blink/trunk@192377 bbb929c8-8fbe-4397-9dbb-9b2b20218538
16 files changed
tree: 9fb5e3f0831d29197f026d5c87522d8a0a1a3a20
  1. third_party/